MATLAB Answers

Invalid indexing or function definition

1 view (last 30 days)
Luis Higuera
Luis Higuera on 25 Nov 2020
Commented: Luis Higuera on 25 Nov 2020
syms y(t) s y_lt
dy=diff(y,t);
eqn = dy-y==2*cos(5*t)
cond=y(0)==0
eqnLt=laplace(eqn,t,s)
eqnLt = subs(eqnLt,laplace(y,t,s),y_lt)
y_lt=solve(eqnLt,y_lt)
ysol=ilaplace(y_lt)
Hi, I get this error with the solve function, does anyone know why the error?

  2 Comments

Walter Roberson
Walter Roberson on 25 Nov 2020
The code works when I try in R2020b

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 25 Nov 2020
I suspect that you accidentally created a variable named solve

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!