LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

::DRAWING TWO SIGNAL ::need converter

Solved!
Go to solution

Hi 

I just need to draw 2 signals at same time with index x range [-1.....1] with 0.1 step

 

the first signal is tan hyperbolic(x)  function and the second signal is my function(x) 

 

I think that I need a converter !!

 

 

regards

m,s

hi ?Q>

0 Kudos
Message 1 of 9
(2,758 Views)

First of all, there's a tanh(x) function in straight LabVIEW code.  Look in the Mathematics->Elementary & Special Functions->Hyperbolic palette.

 

Other random things:

  1. There's a while loop that is running once.  The loop is not needed.
  2. You have a bunch of boolean "Equal to TRUE" in there.  Also not needed.  Just pass the boolean through.
  3. Do not wire the N for the FOR loop.  Let the autoindexing take care of the number of cycles.  Use the Array Size to get the number of samples are used.
  4. You probably want to autoindex the output of your FOR loop in order to get your waveform.
  5. Instead of the case structure to choose between 1 and 0, use the Boolean to (1,0) function.  It's in the Numeric->Conversion palette.

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
Message 2 of 9
(2,752 Views)

I did some  change to design as you said crossrulz 

the tanh has been drawn OK

but my function its input always ::21#;; why this?? This make my compactor output for entire loop true

I just need range of x -1 to 1 that enter my function

 

for each of value of x must  stay in loop 2000 times then out from my function that all what i want to do

can any suggestion

 

 

regards

hi ?Q>

0 Kudos
Message 3 of 9
(2,737 Views)

Your VI did not change.  Did you upload the wrong copy?  Didn't save before uploading?

 

As far as the "::21#", is this with highlight execution that you are seeing this?  That would make sense.  The highlight execution shows the size of the array, not the data in it.

 

Each value must iterate 2000 times?


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
Message 4 of 9
(2,715 Views)

dear:

 

Your VI did not change.  Did you upload the wrong copy?  Didn't save before uploading?

 

yes i uploading another one here that is simple

....................................................................

As far as the "::21#", is this with highlight execution that you are seeing this?

 

i did not know that.

...................................................................

Each value must iterate 2000 times?

yes every value of x must enter the loop 2000 times then go to graph

 

i want to compare the result of my function with tanh function with range of input from -1 to 1 by use graph

thank in advace

 

 

hi ?Q>

0 Kudos
Message 5 of 9
(2,704 Views)

I cleaned up your code some, eliminating some duplicate code, initializing the feedback nodes when the loop starts.

 

I don't understand the purpose of the random number.  I would think that would cause nothing but error.


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 6 of 9
(2,700 Views)

Dear  crossrulz

thank a lot.
My is function based on markov chain so with out this random the function will not work

I expect this error .

I want to draw the ideal tanh with my function at same time to see the error like below with x

 

 

 

hi ?Q>

0 Kudos
Message 7 of 9
(2,691 Views)
Solution
Accepted by topic author mangood

mangood wrote:

I want to draw the ideal tanh with my function at same time to see the error like below with x


Something like this?  I simply just called the VI made easier in a FOR loop, autoindexed the outputs, and created the graph plots.


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
Message 8 of 9
(2,683 Views)

okkkkkkkkkk

Heart take this from me  for your help

hi ?Q>

0 Kudos
Message 9 of 9
(2,676 Views)