I am trying to graph a function over time, but im struggling to code this.
3 views (last 30 days)
Show older comments
This is the code i am using
g = 2.4*exp(-t)-2.4*cos(2*t)+4.4*sin(2*t)+10*t*cos(2*t)+72*t*sin(2*t);
fplot(g,[0,10]);
This is the error message
Error in Problem_4_Ans (line 4)
g = 2.4*exp(-t)-2.4*cos(2*t)+4.4*sin(2*t)+10*t*cos(2*t)+72*t*sin(2*t);
^
0 Comments
Accepted Answer
Walter Roberson
on 7 Mar 2025
Two different approaches:
g = @(t) 2.4*exp(-t)-2.4*cos(2*t)+4.4*sin(2*t)+10*t*cos(2*t)+72*t*sin(2*t);
fplot(g,[0,10]);
syms t
g = 2.4*exp(-t)-2.4*cos(2*t)+4.4*sin(2*t)+10*t*cos(2*t)+72*t*sin(2*t);
fplot(g,[0,10]);
0 Comments
More Answers (0)
See Also
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
