求问matlab 的 In an assignment A(I) = B,the number of elements

求问matlab 的 In an assignment A(I) = B,the number of elements in B and I must be the same.错在啊
clear all;
close all
f(1)=1000;
f(2)=400;
f(3)=60;
a(1)=0.005;
a(2)=0.01;
a(3)=0.02;
f=2000;
t=0:0.001:f-0.001;
for i=1:3;
x(i)=exp(-a(i)*2*pi*f(i)*t).*sin(2*pi*f(i)*t.*sqrt(1-a(i)))
end
for i=1:3
subplot(31i);plot(t,x(i));
end
gezhiww 1年前 已收到1个回答 举报

綁綁糖 幼苗

共回答了19个问题采纳率:94.7% 举报

帅锅,你搞得频率也太密集了吧,想考验我的计算机呀我把你的变量减少了点,只要说明问题就行这句x(i)=exp(-a(i)*2*pi*f(i)*t).*sin(2*pi*f(i)*t.*sqrt(1-a(i))) 有问题首先,f是一个常数,不是一个数组,那来的f(i)呢...

1年前

7
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 16 q. 0.028 s. - webmaster@yulucn.com