フィルターのクリア

How do I plot 'standing wave(modal) solution' ?

2 ビュー (過去 30 日間)
Dilan Kilic
Dilan Kilic 2020 年 3 月 21 日
コメント済み: Dilan Kilic 2020 年 3 月 21 日
Hi everyone, i am studying structural dynamics. I want to create modal wave shape solution, but i can't. x-axis should be (x/l) and y-axis should be (modeshape).
clear,clc
x=0:0.2:1;
l=0:0.2:1;
i=1:.001:10;
modeshape=sin(i*pi*(x/l));
plot(x/l,modeshape)
The modeshape formula
and the graphs that i want to plot
thanks a lot:)

採用された回答

Sriram Tadavarty
Sriram Tadavarty 2020 年 3 月 21 日
Hi Dilan,
You made a good try. Here are some suggestions, as the plot indicate for a ratio of x/l, you could make only one of them vary and make sure you get the limits for the axis. Then, there are different plots for different i., implies all of them are not together. So, here are some modifications that can be made
clear,clc
x=0:0.02:1; % Pass x from 0 to 1 at steps of 0.02
l=1; % Set l to 1
i=1:2; %1:.001:10; % Update with range of mode shape functions that are required
for index = 1:length(i)
figure
modeshape=sin(i(index).*pi.*(x./l));
plot(x/l,modeshape)
title(['Mode Shape ' num2str(i(index)) ])
end
% each mode shape is plotted in a different figure
Hope this helps.
Regards,
Sriram
  1 件のコメント
Dilan Kilic
Dilan Kilic 2020 年 3 月 21 日
Sriram, thanks for information :) I understand where the problem is.
Regards,
Dilan.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by