Prev: Interp1 function
Next: imrotatemex
From: abdalgobori on 19 May 2010 14:26 Hi people of mathwork and Engineering Take a look at this question Given the sin of 0 to (-90) degrees in 1 degree increments (below), write a program to printout the sin, cos or tan (or all) of any angle to within 1 degree. You cannot use any built-in trigonometric functions, you must write your own functions using the given values as a look up table. Your program must correctly handle 0-360 degrees for positive & negative angles and multiples of 360 degrees. Your code must be fully commented. You must write an explanation of the operation of the code. Your explanation may include flowcharts or other diagrams if these assist in the explanation. Iam Given the table of sin from 0 to -90 so based on that i have managed to get sin 0 to 360 on matlab but couldnt run on a loop or how it`s asking me to do so any ideas ??? Thanks Adam
From: Wayne King on 19 May 2010 14:37 "abdalgobori(a)yahoo.com TheFirst" <abdalgobori(a)yahoo.com> wrote in message <ht1afs$g7b$1(a)fred.mathworks.com>... > Hi people of mathwork and Engineering Take a look at this question > Given the sin of 0 to (-90) degrees in 1 degree increments (below), write a program to > printout the sin, cos or tan (or all) of any angle to within 1 degree. You cannot use any built-in > trigonometric functions, you must write your own functions using the given values as a look up > table. Your program must correctly handle 0-360 degrees for positive & negative angles and > multiples of 360 degrees. Your code must be fully commented. You must write an explanation of the > operation of the code. Your explanation may include flowcharts or other diagrams if these assist in > the explanation. > Iam Given the table of sin from 0 to -90 so based on that i have managed to get sin 0 to 360 on matlab but couldnt run on a loop or how it`s asking me to do so any ideas ??? > Thanks > Adam Hi Adam, You should show people what you have done to solve your homework problem with Matlab code to demonstrate your efforts and indicate areas where you are getting stuck, or encountering errors. If you demonstrate that kind of effort, somebody will give you a hint on how to proceed. Wayne
From: EE Student on 19 May 2010 15:40 "abdalgobori(a)yahoo.com TheFirst" <abdalgobori(a)yahoo.com> wrote in message <ht1afs$g7b$1(a)fred.mathworks.com>... > Hi people of mathwork and Engineering Take a look at this question > Given the sin of 0 to (-90) degrees in 1 degree increments (below), write a program to > printout the sin, cos or tan (or all) of any angle to within 1 degree. You cannot use any built-in > trigonometric functions, you must write your own functions using the given values as a look up > table. Your program must correctly handle 0-360 degrees for positive & negative angles and > multiples of 360 degrees. Your code must be fully commented. You must write an explanation of the > operation of the code. Your explanation may include flowcharts or other diagrams if these assist in > the explanation. > Iam Given the table of sin from 0 to -90 so based on that i have managed to get sin 0 to 360 on matlab but couldnt run on a loop or how it`s asking me to do so any ideas ??? > Thanks > Adam If you arent allowed to use the built in functions, write your own. Since you only need to be accurate to 1 degree you could write a function to evaluate the taylor sersies representations of sin, cos, and tan, arctan can be written in the form of a complex (i.e. invloving imaginary numbers) logarithmic equation, alternatively, you could use eulers identity and evaluate in terms of complex exponentials.
|
Pages: 1 Prev: Interp1 function Next: imrotatemex |