Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Mathematics (https://www.askmehelpdesk.com/forumdisplay.php?f=199)
-   -   How can I write a program (mat lab problem)? (https://www.askmehelpdesk.com/showthread.php?t=516574)

  • Oct 14, 2010, 05:24 AM
    AkiraCole
    How can I write a program (mat lab problem)?
    How can I write a program (mat lab problem)?
    HELP PLEASE! I


    write a program that write a table of sinus numbers 1.0, 1.1,. 2.0 with the following format

    x sin(x)
    1.0 0.841
    1.1 0.891
    1.2 0.932
    ...
  • Oct 15, 2010, 05:51 AM
    galactus

    A rather simplistic apprach is to just use a small 'for' loop.

    Type:

    for n=1:10
    s(n)=sin(1+.1*n)
    end

    This loops through from n=1 to 10. For more or less solutions, change the 10 to whatever you wish.
  • Oct 19, 2010, 08:11 AM
    AkiraCole
    Comment on galactus's post
    Thank you so much!

  • All times are GMT -7. The time now is 07:43 PM.