matlab,Inner matrix dimensions must agree.哪里出错了clear;clc;close all;l = 100 ;d = 50 ;k_2=2*pi/2/l;g=9.8;ommiga_2=sqrt(g*k_2*tanh(k_2)*d);Ommiga_0 =sqrt(g*k_2*tanh(k_2)*d) ;t=[0:0.1:100];C_2=(t*ommiga_2*cos(Ommiga_0*t)-sin(ommiga_2*t))/(-2*Om
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 21:29:14
matlab,Inner matrix dimensions must agree.哪里出错了clear;clc;close all;l = 100 ;d = 50 ;k_2=2*pi/2/l;g=9.8;ommiga_2=sqrt(g*k_2*tanh(k_2)*d);Ommiga_0 =sqrt(g*k_2*tanh(k_2)*d) ;t=[0:0.1:100];C_2=(t*ommiga_2*cos(Ommiga_0*t)-sin(ommiga_2*t))/(-2*Om
matlab,Inner matrix dimensions must agree.哪里出错了
clear;
clc;
close all;
l = 100 ;d = 50 ;
k_2=2*pi/2/l;
g=9.8;
ommiga_2=sqrt(g*k_2*tanh(k_2)*d);
Ommiga_0 =sqrt(g*k_2*tanh(k_2)*d) ;
t=[0:0.1:100];
C_2=(t*ommiga_2*cos(Ommiga_0*t)-sin(ommiga_2*t))/(-2*Ommiga_0)
plot(t,C_2)
matlab,Inner matrix dimensions must agree.哪里出错了clear;clc;close all;l = 100 ;d = 50 ;k_2=2*pi/2/l;g=9.8;ommiga_2=sqrt(g*k_2*tanh(k_2)*d);Ommiga_0 =sqrt(g*k_2*tanh(k_2)*d) ;t=[0:0.1:100];C_2=(t*ommiga_2*cos(Ommiga_0*t)-sin(ommiga_2*t))/(-2*Om
倒数第二句少了一个点,要用.*
clear all;clc;
l=100;
d=50;
k_2=2*pi/2/l;
g=9.8;
ommiga_2=sqrt(g*k_2*tanh(k_2)*d);
Ommiga_0 =sqrt(g*k_2*tanh(k_2)*d) ;
t=0:0.1:100;
C_2=(t*ommiga_2.*cos(Ommiga_0*t)-sin(ommiga_2*t))/(-2*Ommiga_0)
plot(t,C_2);