下标索引必须为正整数类型或逻辑类型。

13 ビュー (過去 30 日間)
果博东方开户网址【80877.tv】
方程和应该得到的图
我的编程和反馈图如下: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))
问题:一直显示下标索引必须为正整数类型或逻辑类型。

採用された回答

新盛公司注册登录网址【hn666.cc】
参考代码:
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 件)

カテゴリ

Help Center および File Exchange数学 についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!