Error using * on matlab basic command
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
have an error using the * command not sure how to fix the line of code. it is the last bolded line before the commented out section
clc;
clear ;close all
v=0:0.1:100; % mlp
y = 0.35;
Amplitude = 0.35;
Peroid = 12;
Weight = 155.42;
c = 40;
k = 13.75;
Wn = sqrt(k/Weight);
W = 2*pi/12;
r = Wn/W;
zeta = c/2*(sqrt(Weight*k));
zetasq = zeta^2;
X = y*sqrt((1-r*v*zetasq*r*v.^2)./(((1-r.*v.^2.).^2.)+4*zetasq*r*v.^2.));
%v=0:0.1:100; % mlp
%
% % displacement amplitude
%
% X= 0.45* sqrt( 1+13.050*v.^2 ./( (1-12.745*v.^2 ).^2 +(13.05*v.^2) ) );
%
figure(1)
plot(v,X)
grid on;
xlabel('velocity (Mph)');
ylabel('amplitude of X (ft)');
title('Amplitude of X vs velocity');
0 Kommentare
Antworten (1)
KSSV
am 29 Apr. 2021
clc;
clear ;close all
v=0:0.1:100; % mlp
y = 0.35;
Amplitude = 0.35;
Peroid = 12;
Weight = 155.42;
c = 40;
k = 13.75;
Wn = sqrt(k/Weight);
W = 2*pi/12;
r = Wn/W;
zeta = c/2*(sqrt(Weight*k));
zetasq = zeta^2;
X = y*sqrt((1-r*v*zetasq*r.*v.^2)./(((1-r.*v.^2.).^2.)+4*zetasq*r.*v.^2.));
%v=0:0.1:100; % mlp
%
% % displacement amplitude
%
% X= 0.45* sqrt( 1+13.050*v.^2 ./( (1-12.745*v.^2 ).^2 +(13.05*v.^2) ) );
%
figure(1)
plot(v,X)
grid on;
xlabel('velocity (Mph)');
ylabel('amplitude of X (ft)');
title('Amplitude of X vs velocity');
0 Kommentare
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!