# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

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

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:

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:

Message 1 of 6
(220 Views)

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

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.

Message 2 of 6
(213 Views)

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

Hi Reduanul,

• 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 LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
Message 3 of 6
(209 Views)
Solution
Accepted by topic author REDUANUL

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

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.)

LabVIEW Champion. It all comes together in GCentral
What does "Engineering Redefined" mean??
Message 4 of 6
(178 Views)

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

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

Message 5 of 6
(177 Views)

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

@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.

Message 6 of 6
(140 Views)