필터 지우기
필터 지우기

How to calculate subs inside a loop

조회 수: 2 (최근 30일)
Torkan
Torkan 2018년 5월 16일
답변: Torkan 2018년 5월 17일
Hi,
I have a code with a function named [B]. A1,A2,A3 are different variables calculated inside a loop. I want to have BB been calculated iteratively inside a loop and give a new BB. However, it does not work and gives the below error. Does anybody know how could I change the code in order to calculate BB?
The xxxx is the A1 A2 A3 that we had before.
Error using sym/subs>normalize (line 221) Entries in second argument must be scalar.
Error in sym/subs>mupadsubs (line 147) [X2,Y2,symX,symY] = normalize(X,Y); %#ok
Error in sym/subs (line 135) G = mupadsubs(F,X,Y);
BB=0 quads=[1/4, 1/4; 3/5, 1/4; 1/7, 1/5; 1/4, 3/6];
for i=1:1:4
A1= quads(i);
for j=1:1:4
A2= quads (j);
A3= 1-A1-A2;
[B]= guassshafuncderivative(A1 ,A2 , A3);
BB=subs(B,[A1,A2,A3],[xxxx,xxxx,xxxx])
BB=BB+BB;
end end

채택된 답변

Torkan
Torkan 2018년 5월 17일
No answer for this hard question?:)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by