Matrix dimensions must agree.
이전 댓글 표시
q=sum(q_)';
pr= [0.2 0.5 1 1.5];
b0_(i,:)=pr.*((f_(1,:)')-M*(f_(1,:)').*(D1*(f_(1,:)'))-g.*M*(1+2.*y.*g).*((f_(1,:)').^2));
b1_(i,:)=-2*y.*g;
b2_(i,:)=pr*(M*(f_(1,:)').^2);
b0=diag(b0_(i,:));
b1=diag(b1_(i,:));
b2=diag(b2_(i,:));
B=b0*D1+b1*D2+b2;
B1=B(1:N,1:N); % First B.C is imposed
B2=B(2:N-1,1:N);
B3=[D1(1,1:N);A2;D1(N+1,1:N)]; % Second and third derivative B.Cs are imposed
d=D2(2,1:N);
k=pr*((f_(1,:)').*(D1*q_(1,:)')+M*((f_(1,:)').^2).*(D2*q_(1,:)')-M*(f_(1,:)').*(D1*(f_(1,:)')).*(D1*(q_(1,:)'))-...
M*(1+2.*y.*g).*((f_(1,:)').^2).*(D1*(q_(1,:)')))-(1+2*g.*y).*(D2*(q_(1,:)'));
댓글 수: 1
Give the complete code and specify which line you got error.
Undefined function or variable 'q_'.
Error in Joke (line 2)
q=sum(q_)';
답변 (1개)
카테고리
도움말 센터 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!