Results 1 to 2 of 2

Math Help - Matlab error in my code

  1. #1
    Newbie
    Joined
    Sep 2013
    From
    beirut
    Posts
    19

    Matlab error in my code

    Matlab code
    can you plz find my error
    code:

    L=1;
    T_inf=30;
    qA=500;
    c=5;
    qB=c.*qA;
    h=25;
    dx=L/2;
    dy=L/4;
    kB=50;
    syms T1T2T4T5T7T8
    for i=0:10:20
    kA=i;
    [sT1,sT2,sT4,sT5,sT7,sT8]=solve(T1*((h/dy)+(kA/dx^2)+(kA/dy^2))-T2*(kA/dx^2)-T4*(kA/dy^2)-(qA+h*T_inf)/dy,...
    T2*((h/dy)+(kA/dx^2)+(kA/dy^2))-T1*(kA/dx^2)-T5*(kA/dy^2)-(qA+h*T_inf)/dy,...
    T1*(-kA/dy^2)+T4*(((kA+kB)/dx^2)+(kA+kB)/dy^2)-T5*((kA+kB)/dx^2)-T7*(kB/dy^2),...
    T2*(-kA/dy^2)-T4*((kA+kB)/dx^2)+T5*(((kA+kB)/dx^2)+(kA+kB)/dy^2)-T8*(kB/dy^2),...
    T4*(-kB/dy^2)+T7*((h/dy)+(kB/dx^2)+(kB/dy^2))-T8*(kB/dx^2)-(qB+h*T_inf)/dy,...
    T5*(-kB/dy^2)-T7*(kB/dx^2)+T8*((h/dy)+(kB/dx^2)+(kB/dy^2))-(qB+h*T_inf)/dy);
    T_1(i)=sT1; T_2(i)=sT2; T_4(i)=sT4; T_5(i)=sT5; T_7(i)=sT7; T_8(i)=sT8;
    end
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Feb 2013
    From
    Hungary
    Posts
    24

    Re: Matlab error in my code

    There are a lot of errors. For example, you should write: syms T1 T2 T4 T5 T7 T8.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Matlab code
    Posted in the Math Software Forum
    Replies: 2
    Last Post: April 4th 2011, 03:18 AM
  2. The [5,2] error correcting code
    Posted in the Number Theory Forum
    Replies: 3
    Last Post: July 25th 2010, 09:03 AM
  3. error correcting code
    Posted in the Advanced Math Topics Forum
    Replies: 5
    Last Post: February 19th 2010, 03:37 AM
  4. Error Correcting Code
    Posted in the Advanced Math Topics Forum
    Replies: 0
    Last Post: January 25th 2010, 08:44 PM
  5. Replies: 1
    Last Post: December 10th 2009, 11:48 PM

Search Tags


/mathhelpforum @mathhelpforum