graph won't appear
1 回表示 (過去 30 日間)
古いコメントを表示
>> zi = 0.2; % define the value of damping coefficient
>> r = 0:0.05:10; % define the range of r
>> for i = 1; % length(r)
>> T(i) = sqrt(1+(4*(zi^2)*(r(i)^2))) / sqrt(((1-r(i)^2)^2)+(4*(zi^2)*(r(i)^2)));
>> end
>> plot (r,T); % plot T vs r
0 件のコメント
回答 (1 件)
Daniele Sonaglioni
2021 年 5 月 13 日
Try this code. You have forgotten to specifay the indices in the for cicle
zi = 0.2; % define the value of damping coefficient
r = 0:0.05:10; % define the range of r
for i = 1:length(r); % length(r)
T(i) = sqrt(1+(4*(zi^2)*(r(i)^2))) / sqrt(((1-r(i)^2)^2)+(4*(zi^2)*(r(i)^2)));
end
plot (r,T); % plot T vs r
1 件のコメント
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!