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 commentaire

KSSV
KSSV le 2 Nov 2017
Modifié(e) : KSSV le 2 Nov 2017
Give the complete code and specify which line you got error.
Undefined function or variable 'q_'.
Error in Joke (line 2)
q=sum(q_)';

Connectez-vous pour commenter.

Réponses (1)

mariam ahmad
mariam ahmad le 3 Nov 2017

0 votes

i can get graph if i give one value to pr ,but when i give more than one value it give me this error.

Catégories

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by