Hi Mert,
The Probelm arises in the 3rd iteration. In the 3rd Iteration x1 is size of 3x1 symfun and grad_x1 is size of 9x1 .
so the line
tx1_temp=subs(dif_x1,x1-grad_x1*t);
is throwing error as MATLAB is not able to resolve "x1- grad_x1*t".
So make sure both x1 and grad_x1 are of same size or "x1-grad_x1*t" should make sense like we can subtract 2x2 matrix from 1x2 like this :
syms x1 x2
p = [x1,x2;x2,x1];
t = [x1,x1] - p;
Thanks,
Deepak
Best Answer