Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Substituting Value into Unknown Inside Matrices

Asked by Shinn on 28 Jun 2013

Recently I got stuck on performing such a work, which is substituting into matrices I've tried over "Subs()" but it seems to be having wrong output

{ x=[1 3 5 7 9];

n=2;

 syms a;
for i=1:n %row %n=2
    for j=1:n %col %n=2
         A(i,j)=(a^(2*(n)-i-j+2))    
    end

end

 syms a;
 syms b;
 for k=1
     for l=1:n+1
         C(k,l)=b*(a)^(n)
         n=n-k;             %when = 2 ,C = [ x^2*y, x*y, y]
     end
 end
 c=transpose(C)
 %   totalsub=0;
   totalsub=subs(A,a,x)

% g=poly2sym(A) % X=(inv(A))*(c)

 }
when a 3x3 matrix times with 3x1 matrix it should be 3x3 but..
Even at the subs part...

0 Comments

Shinn

Products

No products are associated with this question.

0 Answers

Contact us