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
darova 2020년 1월 19일

0 개 추천

Oops?
123.PNG

댓글 수: 8

zahra zamani
zahra zamani 2020년 1월 19일
please help me .i edited it . but i have error yet!
ki=zeros(length(x),51);
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))).^2;
ki(i-1,:)=temp(i-1,:)*dx;
end
Error :
Index in position 1 exceeds array bounds (must not exceed 1).
Error in m2 (line 69)
(- 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))).^2;
Walter Roberson
Walter Roberson 2020년 1월 19일
x is a row vector. Why are you trying to access multiple rows of it?
darova
darova 2020년 1월 19일
I agree
zahra zamani
zahra zamani 2020년 1월 19일
i must to calculate k.
xx.PNG
x=1:0.1:Ls; (Ls=6)
how can i write it?
Walter Roberson
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
zahra zamani 2020년 1월 19일
no.E is Young's modulus and equal to 90. I is the second moment of area of the cross section and equal 0.0064. E and I are constant.
b=0.32;
phi(x)=( cos(b*X)-cosh(b*X) )+...
( ( cos(b*l)+cosh(b*l) ) / ( sin(b*l)+sinh(b*l)) )*(sin(b*X)-sinh(b*X));
phi``(x)= - b^2*cos(X*b) - b^2*cosh(X*b) - ((cos(6*b) + cosh(6*b))*(b^2*sin(X*b) + b^2*sinh(X*b)))/(sin(6*b) + sinh(6*b))
(phi(x) is the ith mode shape of the clamped-free cantilever)
Walter Roberson
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
zahra zamani 2020년 1월 20일
thank you so much .
i can to calculate k with trapz.
thanks

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

질문:

2020년 1월 19일

댓글:

2020년 1월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by