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
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');

类别

帮助中心File Exchange 中查找有关 Annotations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by