Results 1 to 2 of 2

Math Help - Plotting surface by Matlab

  1. #1
    Member
    Joined
    Sep 2009
    Posts
    162

    Plotting surface by Matlab

    Hello

    I need to plot the function

    u(t,x) = cos (pi x)cos (pi t).
    where
    x, and t between 0 and 1.

    How can I plot this three dimension surface?

    With All Best
    Raed
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Member
    Joined
    Apr 2012
    From
    Erewhon
    Posts
    200
    Thanks
    131

    Re: Plotting surface by Matlab

    Quote Originally Posted by raed View Post
    Hello

    I need to plot the function

    u(t,x) = cos (pi x)cos (pi t).
    where
    x, and t between 0 and 1.

    How can I plot this three dimension surface?

    With All Best
    Raed
    Code:
    --> x=linspace(0,1,10);
    --> t=linspace(0,1,10);
    --> [T,X]=meshgrid(t,x);
    --> U=cos(pi.*T).*cos(pi.*X);
    --> surf(X,T,U);
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Plotting inequality in matlab
    Posted in the Math Software Forum
    Replies: 0
    Last Post: May 24th 2012, 04:03 AM
  2. Help with surface plotting experimental data (Matlab)
    Posted in the Math Software Forum
    Replies: 1
    Last Post: August 3rd 2009, 06:02 AM
  3. Matlab - Plotting Circles
    Posted in the Math Software Forum
    Replies: 1
    Last Post: February 16th 2009, 09:28 AM
  4. MATLAB: Plotting MATRIX?
    Posted in the Math Software Forum
    Replies: 3
    Last Post: January 25th 2009, 01:21 PM
  5. MATLAB - plotting a quadratic
    Posted in the Math Software Forum
    Replies: 2
    Last Post: June 15th 2008, 06:25 PM

Search Tags


/mathhelpforum @mathhelpforum