Error using * on matlab basic command
Afficher commentaires plus anciens
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');
Réponses (1)
KSSV
le 29 Avr 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');
Catégories
En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!