Group Abstract Group Abstract

Message Boards Message Boards

0
|
9.4K Views
|
8 Replies
|
5 Total Likes
View groups...
Share
Share this post:

How to do Cos 48, then Cos 49 and on up to 58 degrees

I would like to know how to program and how to plot a semi-repetitive operation. I would like to start to get the numerical value of Cos of 48 degrees and plot it. Then Cos 49 degrees and plot it and so on up to 59 degrees.

thanks Jake

POSTED BY: Jake Trexel
8 Replies

Fortran is easier than doing that with Mathematica. I can see why several people said to study the commands of Mathematica vs. the old fashion way.
Thanks Jake

POSTED BY: Jake Trexel
POSTED BY: Michael Rogers

I think you would really benefit by learning the Wolfram Language (i.e. Mathematica) as it's intended to be used and how it is most powerful. Though one can write old school procedural programs in Mathematica using GOTO, RETURN & c, it is almost always the wrong thing to do. Once you know some of the rudiments of the language you will be amazed ;-)

Take a leisurely approach and start working through the introductory book that Stephen Wolfram recently wrote. It's on-line at

http://www.wolfram.com/language/elementary-introduction/preface.html

POSTED BY: David Reiss

Thanks for the link David

POSTED BY: Jake Trexel

Thank you. I am old school and I still think that I need to write a little program using IF, GOTO and so on. thanks

POSTED BY: Jake Trexel

No need to use Table and a counter in order to form the list; leave the details to Mathematica! Thus:

 ListPlot[Cos[Range[48, 58] Degree], PlotRange -> {All, {-1, 1}}]
POSTED BY: Murray Eisenberg

Thank you

POSTED BY: Jake Trexel

Here is an answer to your question, but first, I think that you would profit by starting to teach yourself Mathematica. Here is a link to a thread that covers some beginner books and other resources to learn the Wolfram Language:

http://community.wolfram.com/groups/-/m/t/613588

ListPlot[Table[Cos[i Degree], {i, 48, 58}],  PlotRange -> {All, {-1, 1}}]
POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard