MATLAB Answers

Help with fsolve command, in solving system of equations acquired by spectral collocation.

53 views (last 30 days)
I am solving a coupled system of equations using spectral collocation scheme,
with b.c
u=0,t=0.5 at y=0;
u=0,t=1 at y=1;
The set of equations at (N+1) collocation points will be described as:
U_0 = 0, T_0=1
U_N = 0, T_N=0.5
D2 is the differentiation matrix of order(N+1), given by D2=D*D
U and T are the vectors of unknowns
with given boundary conditions, how can solve the set of algebraic equations in MATLAB?
Can it be solved using "fsolve"?
As I do now know how to express the vectores U and T in the code.

Accepted Answer

Walter Roberson
Walter Roberson on 28 Jan 2021
You are mixing notations it looks like to me. D*U would be used more for working with Laplace transforms. In the space you are working in, which is not the laplace space, you do not use multiplication notation and you cannot treat D like a variable to be solved for, and cannot use fsolve.
I would suggest that you use the symbolic toolbox and dsolve().
Tanya Sharma
Tanya Sharma on 30 Jan 2021
Thanks. I am able to create the system of equations (tanya1.m).
I applied to boundary condition as well.
Now how to solve them using fsolve?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by