So new to using PicoScope equipment. Im using 2204a model. I want to create some phase diagrams and Bode plots from some experimental data in Matlab.

I would like to take numerous PicoScope files of a circuit. Where each file represents a 100Hz increase and has two different voltage signals. I want to import (phase difference, V(a), V(b)) from each PicoScope file into a single Matlab file.

Not really where to even start here. I'd appreciate a nudge in the right direction. Thanks again.

## Bode plots in Matlab using numerous imported PicoScope files

### Re: Bode plots in Matlab using numerous imported PicoScope f

Hi,

If you have saved your data from PicoScope 6 into a .CSV file, you can read it into Matlab using the following command method:

filename = 'csvlist.csv';

M = csvread(filename)

This will take the contents of the file and store it into variable

Bilal Patel

Technical Support Engineer.

If you have saved your data from PicoScope 6 into a .CSV file, you can read it into Matlab using the following command method:

filename = 'csvlist.csv';

M = csvread(filename)

This will take the contents of the file and store it into variable

**M**In the form of a matrix. Then you can use the matrix (or separate into vectors) and carry out your intended operations.Bilal Patel

Technical Support Engineer.

Bilal Patel

Technical Support Engineer

Pico Technology

Technical Support Engineer

Pico Technology

### Re: Bode plots in Matlab using numerous imported PicoScope f

Is it a requirement that you use Matlab? If not, you could consider my application to solve your general problem: http://bitbucket.org/hexamer/fra4picoscope/wiki/Home It does require Windows (it's not cross-platform yet). Version 0.4b supports 2204A.

Otherwise, if you need to use Matlab, then I would ask where you are intending to do the phase and magnitude calculations - in the PicoScope app or in Matlab?

There is a math channel formula posted numerous places on this board that computes phase shift within the PicoScope App: acos(integral(A*B)/(sqrt(integral(A*A))*sqrt(integral(B*B))))/Pi*180

If your signals are clean that might work well.

If you're using Matlab, then there are many options for computing phase shift between two signals. One option is to compute DFTs for each signal, then subtract phases. The DFT could be done with FFT, plain (naive) DFT, or Goertzel. Once you're using a DFT, youll get magnitude as well.

If your question is more about importing and manipulating the data, then I'll defer to someone who has more experience there.

Otherwise, if you need to use Matlab, then I would ask where you are intending to do the phase and magnitude calculations - in the PicoScope app or in Matlab?

There is a math channel formula posted numerous places on this board that computes phase shift within the PicoScope App: acos(integral(A*B)/(sqrt(integral(A*A))*sqrt(integral(B*B))))/Pi*180

If your signals are clean that might work well.

If you're using Matlab, then there are many options for computing phase shift between two signals. One option is to compute DFTs for each signal, then subtract phases. The DFT could be done with FFT, plain (naive) DFT, or Goertzel. Once you're using a DFT, youll get magnitude as well.

If your question is more about importing and manipulating the data, then I'll defer to someone who has more experience there.