코드에 대해서

조회 수: 2 (최근 30일)
chae sungwon
chae sungwon 2021년 10월 23일
답변: Angelo Yeo 2023년 12월 27일
syms a b c d e;
f1=-C1*c*b+C2*a*b^2+2*C3*a*b-B11*c+D11*a-C4*c*b+2*C5*a*b^2-C6*d*b+D12*b-C7*d*b+C8*a*b^2+C9*b^2+(Ly.^2.*Nx.*b)./48+Mx+(Lx.^2.*Ny.*b)./48;
f2=-C1*a*c+C2*a^2*b+C3*a^2-C4*a*c+2*C5*a^2*b+D12*a-C6*d*a-C7*d*a+C8*a^2*b+2*C9*a*b-B22*d+D22*b+(Ly.^2.*Nx.*a)./48+(Ly.^2.*Ny.*a)./48+My;
f3=A11*c-C1*a*b-B11*a+A12*d-C4*a*b-Nx;
f4=A12*c-C6*a*b-B22*b+A22*d-C7*a*b-Ny;
S=solve(f1,f2,f3,f4,a,b,c,d);
a=double(S.a);
b=double(S.b);
c=double(S.c);
d=double(S.d);
for j=1:length(a)
if isreal(a(j))==1
m=0;
n=0;
for x=0:Lx
m=m+1;
for y=0:Ly
n=n+1;
u(m,n,j)=double(c(j)*x-((a(j)^2*x^3)/6)-((a(j)*b(j)*x*y^2)/4));
v(m,n,j)=double(d(j)*y-((b(j)^2*y^3)/6)-((a(j)*b(j)*x^2*y)/4));
w(m,n,j)=double(0.5*((a(j)*x^2)+(b(j)*y^2)));
if y==Ly
n=0;
end
end
end
end
end
e=w;
Df=diff(e,x);
Aa=e(:,:);
plot3(u(:,:,1),v(:,:,1),w(:,:,1),'r')
xlabel('x (mm)')
ylabel('y (mm)')
zlabel('z (mm)')
title('Laminate')
% for j=1:length(a) 부터 설명해주세요 이해를 못하겠습니다. 참고로 u,v는 평면의 방정식이고 w는 hyer이론의 방정식입니다. 곡률을 구하기 위한 식이고요

답변 (1개)

Angelo Yeo
Angelo Yeo 2023년 12월 27일
MATLAB의 기초적인 구문에 대한 이해가 필요한 것으로 보입니다. 우선 아래의 MATLAB Onramp 과정을 진행해보는 것을 추천드립니다.

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!