Results 1 to 2 of 2

Math Help - matlab for loop help.. NO idea where to start..

  1. #1
    Junior Member
    Joined
    Feb 2009
    Posts
    29

    matlab for loop help.. NO idea where to start..

    Use a “for” loop to create a vector with nth element 1+(-1)n+1/(2n+1), and plot it for n=1 to n=10. Label the x-axis “frequency (w)” and the y-axis “phase (f)”. To get “w” use “\omega”; how do you think you get f?



    I know how to label plots and stuff now, but how do I do the first part.. Use a for loop to create a vector with nth element .... from above?

    If someone could solve this i will be really grateful!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Senior Member
    Joined
    Nov 2009
    Posts
    263
    Quote Originally Posted by Mathhelpz View Post
    Use a “for” loop to create a vector with nth element 1+(-1)n+1/(2n+1), and plot it for n=1 to n=10. Label the x-axis “frequency (w)” and the y-axis “phase (f)”. To get “w” use “\omega”; how do you think you get f?



    I know how to label plots and stuff now, but how do I do the first part.. Use a for loop to create a vector with nth element .... from above?

    If someone could solve this i will be really grateful!
    Code:
    for i=1:5
        v(i)=1
    end
    it'll produce a vector v with all entries is 1
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. No idea where to start
    Posted in the Algebra Forum
    Replies: 2
    Last Post: August 3rd 2010, 12:06 PM
  2. Complex number.. need an idea to start..
    Posted in the Calculus Forum
    Replies: 7
    Last Post: November 29th 2009, 03:59 PM
  3. No idea where to start
    Posted in the Differential Equations Forum
    Replies: 1
    Last Post: October 24th 2009, 11:32 PM
  4. Replies: 4
    Last Post: April 13th 2009, 06:26 PM
  5. [SOLVED] No idea where to start!
    Posted in the Algebra Forum
    Replies: 11
    Last Post: July 25th 2008, 10:44 AM

Search Tags


/mathhelpforum @mathhelpforum