Réponse apportée
lsqcurvefit not working with coupled ODE Function
Use pfit = lsqcurvefit(@(param_vector,tspan) optimization_beer_fermentation(param_vector, tspan, y0), init_parameters, t_data, ...

plus de 2 ans il y a | 0

Réponse apportée
Calculate angles correctly between two vectors using the dot product.
I think an intuitive way is to compute the angles between the positive x-axis and the respective vector counterclockwise first (...

plus de 2 ans il y a | 0

Réponse apportée
Problem in solving matrix diiferential equation using ode45?
syms t tau_1(t) tau_2(t) tau_3(t) tau_4(t) tau_5(t) tau_6(t) tau_7(t) tau_8(t) tau_9(t) tau_10(t) tau_11(t) v = transpose([tau_...

plus de 2 ans il y a | 1

Réponse apportée
DAE Error using mupadengine/feval_internal Expecting as many equations as variables.
The result of the following analysis of your differential-algebraic system is: You must prescribe one of the six algebraic func...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Help for solving linear system that involves Bessel and Hankel Functions
What kind of functions are the P_m^n and Q_m^n ? Fix a finite upper bound N for the loops instead of Inf. Then you have a linea...

plus de 2 ans il y a | 0

Réponse apportée
Plotting Fourier Series (first 5, 15, 25 partial sums, (3 Plots))
You should be able to add the missing plots. x = 0:0.01:2*pi; n = 25; Fn = fourier(n,x); plot(x,Fn) function Fn = fourier(n...

plus de 2 ans il y a | 1

Réponse apportée
Why do I receive Jacobian singular error while solving second order differential equation with boundary conditions?
You need two boundary conditions, not three to fix a solution for a second-order ODE. Anyhow: in each of your cases, you will ...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
PDE Toolbox Coefficient Specification
As I already answered, f has to be referenced as a function or a function handle in your case. It cannot be given in the GUI - ...

plus de 2 ans il y a | 0

Réponse apportée
Matlab doesn't like my function, why?
Use elementwise division (./) and multiplication (.*) in the computation of An and B: https://uk.mathworks.com/help/matlab/mat...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
How to evaluate a symbolic expression having `max` and `diff`?
Use max(x,0) = 0.5*(abs(x)+x) for real x. syms x1 f1 = max([0, (7*sin(4*pi*x1))/10], [], 2, 'omitnan', ~in(x1, 'real')) ...

plus de 2 ans il y a | 0

Réponse apportée
Curve fitting of a portion of a plot and linear equilibrium of both plots
How do I curve fit of after equilbrium points in electron temperature profile so that they both equilibriate in a single line ?...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
How to make a local function that returns a vector
% parameters N=100; div=0.1; p=sqrt(3); q=0.5; r=2; % Initial values astart=5; bstart=0.1; % function [a,b]=fcn2(N...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
I cannot get fplot to plot my piecewise function past an x-axis value of 5
syms t %declare a symbol voltage_values = piecewise(0<=t<=3,25,3<t<=6,0,6<t<=7,-75); fplot(t,voltage_values,[0 7]) %xlim([0 7...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Trying to Solve quadratic inequalities
Don't expect that MATLAB succeeds for complicated systems of quadratic inequalities. But for this simple one, it returns a solut...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Multivariable Integration w.r.t to 1 variable: 2nd variable is a function of 1st
If y is a function of x, your integrand equals F(y(x~))*y'(x~) dx~. Thus your integral equals integral_{x~=f_lower(x)}^{x~=f_...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
Solving a matrix equation with fixed point iteration method
main() function main clear; clc; format long % parameters of equations: E = 1; n = 0.1; u = 0.2; % parameters of this ...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
newton raphson methon and symbolic functions
Better differentiate your function with respect to h in advance and pass the result to "dvolume" so that you only need to substi...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Specify boundary conditions for each node - Thermal problem
Supply your array or matrix "Data" as an additional input to "mygfun" and "myqfun" and use interpolation to supply the values fo...

plus de 2 ans il y a | 0

Réponse apportée
Subs Error while using solve function
You will have to find criteria to sort out the solution you want. E.g. for real solutions only you could use syms R P = 10; e...

plus de 2 ans il y a | 0

Réponse apportée
I estimate my desired vector with the given code but can't when.....
As you can see, the difference between xo and the noise-added xo is quite large. Thus you can expect that the difference in the ...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Optimization problem with array input
You might want to try "intlinprog" with x being a binary vector with x(i) = 1 meaning: ball i is picked and x(i)= 0 meaning: bal...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
Creating a for loop based on a condition
i = 0; tolerance = 1e-4; imax = 100; output = 1; value = ...; while abs(output-value) > tolerance && i < imax i = i + ...

plus de 2 ans il y a | 0

Réponse apportée
Failure in initial nonlinear constraint function evaluation. FMINCON cannot continue.
You forgot to include "RCbeamdata.xls". And you know that you fix x(2) to x0(2) if you set lb(2) = ub(2) = x0(2) ? And you mus...

plus de 2 ans il y a | 0

Réponse apportée
error updating function line
This code plots O(i): k=3500; m=5; c=270; a=0.75; T=1.5; w=2*pi/T; g=9.81; syms t a1=2734; a2=-6718; a3=5682; a4=-1...

plus de 2 ans il y a | 0

Réponse apportée
Convection-Diffusion-Reaction Equation ( 2D) with a given Constrained Optimal Control Problem
What do you want to control with which constraints and how ? Optimal control problems together with ordinary or partial differe...

plus de 2 ans il y a | 0

Réponse apportée
finding fit parameters between two functions
Make a function that - given tau and the parameters you want to fit - returns I_m(tau). Then look at the examples for "lsqcurve...

plus de 2 ans il y a | 2

| A accepté

Réponse apportée
Syntax for optimization with integer and continuous variables, nonlinear equalities and inequalities?
Concerning your attempt with "ga": See the Note below from the documentation of "ga": x = ga(fun,nvars,A,b,Aeq,beq,lb,ub,nonl...

plus de 2 ans il y a | 1

Réponse apportée
issue with simple nested integration of several variables
The problem with integral/integral2/integral3 is always that they call your function not with scalar arguments for the independe...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
How to use Cartesian coordinates to create Grid Surface?
If the CAD file describes the surface of the body in question, there should be a value for the elevation associated with each (x...

plus de 2 ans il y a | 0

Réponse apportée
Solving an integral within a partial derivative
You have to solve a second ordinary differential equation for y: dy/dt = 2*Ste * theta_f*(1-Ste/3 * theta_f + 7/45*Ste^2*theta_...

plus de 2 ans il y a | 0

Charger plus