Filter löschen
Filter löschen

how can i solve this error?

1 Ansicht (letzte 30 Tage)
zahra zamani
zahra zamani am 19 Jan. 2020
Kommentiert: zahra zamani am 20 Jan. 2020
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;

Antworten (1)

darova
darova am 19 Jan. 2020
Oops?
123.PNG
  8 Kommentare
Walter Roberson
Walter Roberson am 19 Jan. 2020
It is not possible to mix discrete x with integral -- not unless you want to do simple numeric integration such as trapz()
zahra zamani
zahra zamani am 20 Jan. 2020
thank you so much .
i can to calculate k with trapz.
thanks

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by