From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

to display sinx in radians

How to write a Labview code to display sinx where x is in radians using first principle

0 Kudos
Message 1 of 24
(5,328 Views)

Uh, use the sine function?

 

http://zone.ni.com/reference/en-XX/help/371361J-01/glang/sine/

 

--Ryan

0 Kudos
Message 2 of 24
(5,325 Views)

Homework questions are getting so terse these days.

0 Kudos
Message 3 of 24
(5,319 Views)

@smercurio_fc wrote:

Homework questions are getting so terse these days.


Do they not know all they have to do is open the Help and search for their function?  And then read.  It would be a lot less effort than signing up on NI's forum and then posting a question.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 24
(5,315 Views)

@TarunAgarwal wrote:

... using first principle


Of course that could mean "without using any trigonometric functions", for example, which is a more interesting problem. 😄

 

You could implement a Taylor Series, for example. 😄

0 Kudos
Message 5 of 24
(5,310 Views)

I also think so that we have to expand it using taylor series .How to start in that case..

0 Kudos
Message 6 of 24
(5,302 Views)

This one i already know my dear..


@sparkysquared wrote:

Uh, use the sine function?

 

http://zone.ni.com/reference/en-XX/help/371361J-01/glang/sine/

 

--Ryan


 

0 Kudos
Message 7 of 24
(5,300 Views)

@TarunAgarwal wrote:

I also think so that we have to expand it using taylor series .How to start in that case..


You start with the wikipedia entry.

 

Then you wrap the given angle into the -pi..+pi interval and apply the taylor series:

 

 

Where do you have problems?

0 Kudos
Message 8 of 24
(5,287 Views)

Just to wrap this all up, here's a quick attempt of a Taylor series implementation of sine(x). With 14 terms, it is within ~1e-15 of the stock trigonometric function shipping with LabVIEW over a very wide range.

 

I am sure improvements are possible.... 😄

 

 

 

 

Attached VI is in LV 8.2)

Download All
Message 9 of 24
(5,242 Views)

Can somebody help me in designing  the same using mathscript node or formula node .

 

In formula node there is no function for factorial representation but in mathscript node there is one...

can anybody write the vi for same...

0 Kudos
Message 10 of 24
(5,180 Views)