Why is my plot plotting blank?

u = 5;
E = 1000;
w = [0:1:100000];
z=1+((w*u)/E).^2
A = w*u/sqrt((z))
figure
plot(w, A); % Plot
% As always, label your graphs
xlabel('Frequency [rad/s]');
ylabel('Amp[Pa]');
title('Amplitude vs Frequency');
My Command Window shows no errors. So I don't understand what is wrong.

 採用された回答

KSSV
KSSV 2016 年 11 月 9 日
編集済み: KSSV 2016 年 11 月 9 日

1 投票

Element by element division in A. In your case it was only a scalar.
u = 5;
E = 1000;
w = [0:1:100000];
z=1+((w*u)/E).^2 ;
A = w*u./sqrt((z)) ; element by element division
figure
plot(w, A); % Plot
% As always, label your graphs
xlabel('Frequency [rad/s]');
ylabel('Amp[Pa]');
title('Amplitude vs Frequency');

その他の回答 (1 件)

David Goodmanson
David Goodmanson 2016 年 11 月 9 日
編集済み: David Goodmanson 2016 年 11 月 9 日

0 投票

x

カテゴリ

タグ

質問済み:

MT
2016 年 11 月 9 日

編集済み:

2016 年 11 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by