# LabVIEW

cancel
Showing results for
Did you mean:

## spectrum

hello everyone,

i have implemented a spectrum function on a time domain signal in MATLAB. i want to implement the same function in Labview. i have tried all spectrum VIs in Labview but they didnot give same output signal.

i donot want to use matlab script in my code. can anyone guide that in labview which VI works same as Spectrum function of Matlab?

Thanks

Message 1 of 19
(741 Views)

## Re: spectrum

Hi sundas,

@sundas wrote:

i have implemented a spectrum function on a time domain signal in MATLAB.

Do you mind to explain which functions with their parameters you use in Matlab?

Do you mind to provide example data used for the spectrum calculation?

@sundas wrote:

i want to implement the same function in Labview. i have tried all spectrum VIs in Labview but they didnot give same output signal.

Do you mind to explain the differences in the output data? Are the results "different by orders of magnitude" or just "different in the 6th or 7th decimal digit"?

Do you mind to explain which (LabVIE) functions you tried?

Do you mind to attach a VI with those function, with example data embedded, so we can discuss about your results?

Best regards,
GerdW

using LV2016/2019/2021 on Win10/11+cRIO
Message 2 of 19
(733 Views)

## Re: spectrum

i have tried power spectrum, auto power spectrum, amplitude and phase spectrum.

In matlab, i have applied

x = spectrum(x (1:end));

As result, i got one signal curve.

But when i implement the said Labview spectrum VIs i got FFT type signal response.

Message 3 of 19
(718 Views)

## Re: spectrum

Hi sundas,

you missed to attach a VI with example data…(LV2017 preferred)

@sundas wrote:

x = spectrum(x (1:end));

As result, i got one signal curve.

But when i implement the said Labview spectrum VIs i got FFT type signal response

What is the difference between a "signal curve" and a "FFT type signal response"?

Don't you expect a "FFT type" response when you calculate a spectrum???

Best regards,
GerdW

using LV2016/2019/2021 on Win10/11+cRIO
Message 4 of 19
(711 Views)

## Re: spectrum

Attached is the screenshot of spectrum response in Labview and matlab with same input signal.

please see the attached screenshots and suggest something.

Thanks..

Message 5 of 19
(653 Views)

## Re: spectrum

Hi sundas,

you missed to attach a VI with typical data included!

(Again: LV2017 preferred)

Best regards,
GerdW

using LV2016/2019/2021 on Win10/11+cRIO
Message 6 of 19
(646 Views)

## Re: spectrum

Hi,

you can refer the attached screenshots to compare the results.

If it helps you this will be great.

Thank you

Message 7 of 19
(609 Views)

## Re: spectrum

Hi sundas,

@sundas wrote:

you can refer the attached screenshots to compare the results.

If it helps you this will be great.

I have to ask for the 3rd time:

When will you attach an example VI with example data included so we can analyze what you have programmed?

When will you attach the Matlab source code used to create your image?

Just showing images of some arbitrary plots does NOT HELP at all…

Best regards,
GerdW

using LV2016/2019/2021 on Win10/11+cRIO
Message 8 of 19
(604 Views)

## Re: spectrum

Hi GerdW,

Please find the attach zipped folder.

Thanks

Message 9 of 19
(586 Views)

## Re: spectrum

Hi sundas,

@sundas wrote:

Please find the attach zipped folder.