ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why is For/While loop Iteration I32?

Thanks a lot.

Now,i have made the final program which can do amplitude-scaling,time shifting and time-scaling as well.I have used a kind of bottom-up approach.As of now i have used all elementary functions but i wanted to simplify it further by either reducing blocks or something else that you may suggest.

0 Kudos
Message 31 of 38
(1,389 Views)

Look at the functions in the Numeric palette.

 

There is a "negate" function (-x) that you can use instead of multiplying by a -1.

There is a "reciprocal" function 1/x that you can use instead of literally taking 1 and dividing by your value.

0 Kudos
Message 32 of 38
(1,374 Views)

@RavensFan wrote:

Look at the functions in the Numeric palette.

 

There is a "negate" function (-x) that you can use instead of multiplying by a -1.

There is a "reciprocal" function 1/x that you can use instead of literally taking 1 and dividing by your value.


Actually, I'd like to go a bit further down the path RavensFan started you on.

For those of you without a viewable copy here is the "Code of current discourse":

!00.png

A ctrl+U and some alignment from the source were taken.

 

Some might ask why go and mess with this "Working" Code.   Primarially "Why equalls em ex plus bee"  but there are a few other nasty things going on that could make you think.  (Although, modern LabVIEW compilers are forgiving)  so let me re-write that snipette.

 

I doubt HIGHLY that this is what you want!  but simplifying your code to migrate loop invarient calculations and resolve tautologies yields this snip:

!0.png


"Should be" isn't "Is" -Jay
0 Kudos
Message 33 of 38
(1,362 Views)

 


Jeff·Þ·Bohrer wrote:

 

!0.png


That express VI just needs to go!

 

Here's what I would probably do... 😉 (not fully verified for correct operation)

 

Message 34 of 38
(1,345 Views)

I knew there was more availableSmiley Very Happy

 

(No surprise to me who found some.) although there is something still there (Sign[B] didn't really work and Christian might be closer with his code but 1x^[0,1]=[1,1]  so Re = 0 as a constant?

 

Did CA just code a bug?


"Should be" isn't "Is" -Jay
0 Kudos
Message 35 of 38
(1,338 Views)

altenbach wrote:

 

Here's what I would probably do... 😉 (not fully verified for correct operation)

 


I was just waiting for somebody to put out the Ramp function.  I just didn't want to go there yet with the OP.



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 36 of 38
(1,337 Views)

@JÞB wrote:

I knew there was more availableSmiley Very Happy

 

(No surprise to me who found some.) although there is something still there (Sign[B] didn't really work and Christian might be closer with his code but 1x^[0,1]=[1,1]  so Re = 0 as a constant?

 

Did CA just code a bug?


 

I coded  [0|1] x 2^1 = [0|2] (multiplications/divisions by integer powers of 2 are just bit shifts, which are very efficient. :D)

 

Message 37 of 38
(1,322 Views)

@altenbach wrote:

@JÞB wrote:

I knew there was more availableSmiley Very Happy

 

(No surprise to me who found some.) although there is something still there (Sign[B] didn't really work and Christian might be closer with his code but 1x^[0,1]=[1,1]  so Re = 0 as a constant?

 

Did CA just code a bug?


 

I coded  [0|1] x 2^1 = [0|2] (multiplications/divisions by integer powers of 2 are just bit shifts, which are very efficient. :D)

 


I suspected that I read that wrong


"Should be" isn't "Is" -Jay
0 Kudos
Message 38 of 38
(1,308 Views)