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.

 Akzeptierte Antwort

KSSV
KSSV am 9 Nov. 2016
Bearbeitet: KSSV am 9 Nov. 2016

1 Stimme

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

Weitere Antworten (1)

Kategorien

Mehr zu Line Plots finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

MT
am 9 Nov. 2016

Bearbeitet:

am 9 Nov. 2016

Community Treasure Hunt

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

Start Hunting!

Translated by