下标索引必须为正整数类型或逻辑类型。
13 views (last 30 days)
Show older comments
果博东方开户网址【80877.tv】
on 15 May 2023
Answered: 新盛公司注册登录网址【hn666.cc】
on 15 May 2023
方程和应该得到的图
我的编程和反馈图如下:t = 0:0.01:2*pi;
f(t) = 5 + 8/pi*sin((pi/10)*t);
g(t) = 5 + 8/(3*pi)*sin((3*pi/10)*t);
z(t) = 5 + 8/(5*pi)*sin((5*pi/10)*t);
figure
plot(t,f(t),t,g(t),t,z(t))
y(t) = f(t)+g(t)+z(t);
plot(t,y(t))
问题:一直显示下标索引必须为正整数类型或逻辑类型。


0 Comments
Accepted Answer
新盛公司注册登录网址【hn666.cc】
on 15 May 2023
参考代码:
clear;clc
t = 0:0.01:2*pi;
f = 5 + 8/pi*sin((pi/10)*t);
g = 5 + 8/(3*pi)*sin((3*pi/10)*t);
z = 5 + 8/(5*pi)*sin((5*pi/10)*t);
figure
plot(t,f,t,g,t,z)
y = f+g+z;
hold on
plot(t,y)
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!