02-24-2014 12:12 PM
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.
02-24-2014 12:38 PM
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.
02-24-2014 01:47 PM
@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":
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:
02-24-2014 02:41 PM - edited 02-24-2014 02:42 PM
Jeff·Þ·Bohrer wrote:
That express VI just needs to go!
Here's what I would probably do... 😉 (not fully verified for correct operation)
02-24-2014 02:46 PM - edited 02-24-2014 02:57 PM
I knew there was more available
(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?
02-24-2014 02:46 PM
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.
02-24-2014 03:31 PM - edited 02-24-2014 03:32 PM
@JÞB wrote:
I knew there was more available
(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)
02-24-2014 03:46 PM
@altenbach wrote:
@JÞB wrote:
I knew there was more available
(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