close all; clear all; clc;timespan = [0 2];y0 = [0.048 0 10; 0.048 0 20; 0.048 0 30; 0.48 0 40; 0.48 0 50; 0.48 0 60]; %array displacement, structural velocity, airflow velocity
figure (1);axis ([-1 1 -1 1]);grid on;hold on;box on;xlabel('Air Flow Velocity (m/s)');ylabel('Structural Displacement Amplitude (m)');for i=1:length(y0) [t,y,v] = ode15s( @equationb ,timespan ,y0);%equation, timestep, initial condition
plot(y(:,1), y(:,2)) %all the first column, all the second column
endfigure (2);hold on;function yp = equationb(t, y, v)A=2.69; B=168; C=6270; D=59900; %coefficients
E= 15000000000;h = 0.048;I = (1/12)*h^4;l=4;rho=1600;m = 0.177; c = 0.77; k = (48*E*I)/l^3; R = (0.5*rho*h);yp (1) = y(2);yp (2,1) = (R/m)*(A*v*y(2).^2 - (B*y(2).^4)/v + (C*y(2).^6)/v^3 - (D*y(2).^8)/v^5) - (c/m)*y(2) - (k/m)*y(1);end
MATLAB: Told I dont have enough input arguments. I dont understand where i went wring
input arguments
Best Answer