LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I scale part of an array then conjugate with last one

Solved!
Go to solution

Hello Everyone,

 

In the eleventh hour, I need to modify one thing before submitting my final project so it will be enormously relief for me if anyone helps me out (I feel baffled about the solution).

 

First of all, pardon me for not uploading a complete snippet or code (due to restriction of my project). But I have uploaded part of the snippet for your reference whatever I did.

 

Now explaining everything from the output graph:

 

111.PNG

X array starts from 100 kHz and ends at 100 MHz then Y array calculating gain and phase for a sweep and gives output to XY graph.

 

In this image left part of the green mark is the gain value (black ink) and phase value (red ink) which should be scaled (with a range approx. 100 kHz to 180 kHz and this range should be selectable) at “0” whereas the right part of the green mark will remain mostly unchanged and conjugate with this scaled value.

 

So only the range value will be scaled to "0" and the rest of the data of the array will remain unchanged.

 

Note: Earlier I scaled the Y array to “0”. For your reference here is the part of the code:

 

11111.png

 

Thanks in advance.

0 Kudos
Message 1 of 6
(1,388 Views)

So what is the question?

 

And did you just post a VI snippet with broken wires? At least put in a constant or something...

 

I'm assuming by scaling to "0" you mean the lowest value in the graph should be at 0. In this case just take range of array you need, find the lowest value and add it to all the other values in range.

0 Kudos
Message 2 of 6
(1,381 Views)

Hi Reduanul,

 

please provide:

  • a link to your previous thread to explain all that "scale to 0" and "range" stuff…
  • attached a executable VI/snippet with some data so we can actually see what you try to implement…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 6
(1,377 Views)
Solution
Accepted by topic author REDUANUL

Initialize an array of zeroes with a size based on the green cursor index, then replace your y data starting at index 0 with it.

 

(As mentioned before, please try to verify the terms you use to describe the problem. I am sure that e.g. "conjugate" has nothing to do with any of this.)

Message 4 of 6
(1,346 Views)

Hello Gerdw,

 


@GerdW wrote:

Yes, I did according to your last suggestion.

 


@GerdW wrote:
  • attached a executable VI/snippet with some data so we can actually see what you try to implement…

Please find the attachment and excuse me for some messy coding. I made this pretty quick (as I have 48 hours left to submit 😞 ) at least you can get an idea about the last attempt. 

 

- Reduanul

0 Kudos
Message 5 of 6
(1,345 Views)

@altenbach wrote:

 

(As mentioned before, please try to verify the terms you use to describe the problem. I am sure that e.g. "conjugate" has nothing to do with any of this.)


I skipped one thing that's why conjugation arose in my mind. Now I got the issue.

 

Thanks altenbach.

0 Kudos
Message 6 of 6
(1,308 Views)