how can i solve this error?
显示 更早的评论
dx=0.1;
x=1:dx:6;
b=0.32;
ki=0;
for i=2:length(x)
temp(i-1,:)=Es*I*...
(- b^2*cos(x(i-1,:)*b) - b^2*cosh(x(i-1,:)*b) - ((cos(6*b) + cosh(6*b))*(b^2*sin(x(i-1,:)*b) + b^2*sinh(x(i-1,:)*b)))/(sin(6*b) + sinh(6*b)));
ki(i-1,:)=temp(i-1,:)*dx;
end
Es and I are constant.
error is
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is
1-by-51.
Error in m2 (line 69)
ki(i-1,:)=temp(i-1,:)*dx;
回答(1 个)
darova
2020-1-19
0 个投票
Oops?

8 个评论
zahra zamani
2020-1-19
Walter Roberson
2020-1-19
x is a row vector. Why are you trying to access multiple rows of it?
darova
2020-1-19
I agree
zahra zamani
2020-1-19
Walter Roberson
2020-1-19
Is EI the exponential integral? Or does it indicate expected value?
What is theta?
This looks like a wave equation to me?
zahra zamani
2020-1-19
Walter Roberson
2020-1-19
It is not possible to mix discrete x with integral -- not unless you want to do simple numeric integration such as trapz()
zahra zamani
2020-1-20
类别
在 帮助中心 和 File Exchange 中查找有关 Numerical Integration and Differentiation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
