LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

to display sinx in radians

Highlighted

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

0 Kudos
Message 1 of 24
(1,859 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
(1,856 Views)

Homework questions are getting so terse these days.

0 Kudos
Message 3 of 24
(1,850 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
0 Kudos
Message 4 of 24
(1,846 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. 😄


LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 5 of 24
(1,841 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
(1,833 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
(1,831 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?


LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 8 of 24
(1,818 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)


LabVIEW Champion. It all comes together in GCentral GCentral
Message 9 of 24
(1,773 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
(1,711 Views)