Answered
fsolve with variable number of unknowns
You can adopt the size of your system in the call to fsolve: A=[a b;c d]; rhs=[-c;-c]; x0=[1;1]; x=fsolve(@(x)myfu...

11 years ago | 0

Answered
Kolmogorov Forward Equation in pdepe
Why don't you use the analytical solution to your PDE ? http://www.quora.com/What-is-the-solution-of-heat-equation-with-dirac...

11 years ago | 0

Answered
Differential and Integral System
Set y5=intg(y1-y3) y6=intg(y2-y4) Then your system becomes (1) y1'+a*(y1-y3)=0 (2) y2'+b*(y2-y4)=0 (3) y5...

11 years ago | 0

| accepted

Answered
Third Order Coupled ODE's
Rewrite your equations as a system of first-order ordinary differential equations and use bvp4c to solve. Best wishes Tors...

11 years ago | 0

Answered
How to solve PDE/Euler Bernoulli equation using MATLAB/Simulink?
Maybe a starting point: http://www.ijastnet.com/journals/Vol_2_No_8_October_2012/10.pdf Best wishes Torsten.

11 years ago | 0

Answered
how can I remove error in fzero?
In your function definition, you divide by Hw. Thus your left interval endpoint is not allowed to be 0. Further: Did you ...

11 years ago | 0

Answered
Differential eguations: modify the program
tspan=[0,100]; y0=[0; 0;10^(-10);0]; M=[1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0]; options=odeset('Mass',M);...

11 years ago | 0

| accepted

Answered
How can I solve for temperature distribution in a composite system (several pde with neumann boundary condtiions) using pdepe/any other PDE solver?
Simply use pdepe, include the interface points within your mesh and make an if-statement to account for the different material p...

11 years ago | 0

Answered
Update variables within an anonymous function? (Using ode45 on a discrete set of DE's)
I guess that temp_dist are your solution variables. Thus your call to ODE45 has to be [times, T] = ode45(@(time, temp_dis...

11 years ago | 0

| accepted

Answered
How to derive the 2D field and convergence based on xy gradients
For your first question: https://www.mathworks.com/matlabcentral/newsreader/view_thread/313599 For your second question: ...

11 years ago | 0

| accepted

Answered
Gradient Problem : FMINUNC requires two input arguments.
Use options = optimoptions('fminunc','GradObj','on','Algorithm','trust-region'); theta0 = [-.0577, .0135, .0524, .011, ...

11 years ago | 0

Answered
Why do I get: "Error using vertcat Dimensions of matrices being concatenated are not consistent."
Does this work ? Entire = []; for b = 1: lengthRS if trigger (b,1) ==1 && trigger (b+1,1) == 1; %...

11 years ago | 0

| accepted

Answered
How to make the ball bounce back?
Type "ballode" at the command line. Best wishes Torsten.

11 years ago | 0

Answered
Problem with matlab fit
Density = -log10(reflectance/100), thus Reflectance = 100*10^(-Density). Inserting into your fit equation gives Scann...

11 years ago | 0

| accepted

Answered
odes with variable coefficients
Here are the results. Best wishes Torsten.

11 years ago | 0

| accepted

Answered
one error in fminsearch?
error=@(x)(fi1-(x(1)+x(2)*Hw.^x(3)))*(fi1-(x(1)+x(2)*Hw.^x(3)))'; x0=[0.005 0.4 2]; [x,fval,exitflag,output] = fminsearc...

11 years ago | 0

| accepted

Answered
Huber function matlab plotting with two intervals
Or more "MATLAB-like": k=1.345; eps=0:0.001:6; f1=zeros(size(eps)); epsf=eps<=k; f1(epsf)=0.5*eps(epsf).^2; ...

11 years ago | 0

Answered
matrix dimensions must agree
Multiplication, division and potentiation of arrays in your case is always componentwise - thus you will have to use .*, ./ and ...

11 years ago | 0

Answered
Huber function matlab plotting with two intervals
k=1.345; eps=zeros(6001); f1=zeros(6001); for i=1:6001 eps(i)=(i-1)*0.001; if eps(i)<=k f1(i)=0.5*(eps(i)^2...

11 years ago | 0

| accepted

Answered
A Matlab loop problem. Getting 1 solution instead of 54. Anyone knows why?
Call(count)=HestonFFTVanilla(phi,S(count),K(count),T(count),rd(count),rf(count),kappa(count),... theta(count),...

11 years ago | 0

Answered
laplace transform of dirac function
syms t s laplace(dirac(t + 2), t, s) Best wishes Torsten.

11 years ago | 0

Answered
How do I convert this integral equation to matlab code?
Use trapz instead of integral. Best wishes Torsten.

11 years ago | 0

| accepted

Answered
How can i use simplex algorithm for optimization of linear eqautions using linprog in MATLAB 2007b?
What so you mean by "optimize a linear equation" ? Find a feasible point ? Best wishes Torsten.

11 years ago | 0

Answered
Solving an Integro-differential equation numerically
i=0: (y(1/2)-y(0))/(1/2)=1-1/3*0+0*integral_0^1(t*y(t))dt -> 2*y(1/2)=2*y(0)+1-1/3*0+0*integral_0^1(t*y(t))dt -> 2*y(...

11 years ago | 0

Answered
ode45 or oder15s any idea for solving the second order wave equation?
function wave x10=...; x20=...; [T,Y] = ode45(@rhs,[0 12],[x10 x20]); plot(T,Y(:,1),'-',T,Y(:,2),'-.'); ...

11 years ago | 0

| accepted

Answered
Can I use a variant of existing code for the finite difference method of analysis on non-quadratic shapes?
Can't you transform the equations such that you solve your problem on the rectangle [0:R]x[0:2*Pi] instead ? The mapping (r...

11 years ago | 0

Answered
dsolve numerically ignoring the analytical solution
What about syms y(x) Dy=diff(y); dsolve(diff(y,2)==-(x+1)*diff(y)+2*y+(1-x^2)*exp(-x),y(0)==-1,Dy(0)==1,'IgnoreAnalyt...

11 years ago | 0

Answered
Can objective function of a linear programming model contain a constant term?
Conjecture: x* is optimal for Max Z = a1x1+a2x2+a3x3+a4x4+K if and only if x* is optimal for Max Z = a1x1+a2x2+a3x3+...

11 years ago | 2

| accepted

Answered
Need MATLAB command for the given expression
What exactly do you need ? An antiderivative of f(t) = cos^2(w*t) is given by F(t)=0.5*t+0.25/w*sin(2*w*t). So evaluate F ...

11 years ago | 0

Answered
How do I find the orthogonal projection of a point onto a plane
min: (x0+lambda*a0+mu*b0-x)^2 + (y0+lambda*a1+mu*b1-y)^2 + (z0+lambda*a2+mu*b2-z)^2 gives the distance squared from the point...

11 years ago | 0

| accepted

Load more