Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Integrating Pspice with matlab (how to import data)

Status
Not open for further replies.

troop123pack

New Member
Hello,

I have written a Pspice program, and simulated transfer and output characteristics. I have it saved as a SPICE DECK EXAMPLE.dat file.

I am supposed to try to load the data into matlab using command load '.dat' -ascii;

Please how can I transfer that data into matlab so MATLAB recognises it so I can load the data into MATLAB.

I have tried to import it into matlab using import data then I wrote the command in matlab but it says Error using load. Unable to read file 'SPICE DECK EXAMPLE.dat': no such file or directory.

In summary, What's the best process of transferring simulated data from Pspice into matlab?


George
 
Are you trying to import the Spice circuit description, or the results of a Spice simulation (voltages at nodes vs time). I suspect Matlab could understand the latter, but wouldn't have a clue as what to do with the former...

Here is how to do it in LTSpice.

I created a trivial circuit and simulated it.
I plotted the voltage vs time at node a V(a) and node b V(b).
I asked LTSpice to export V(a) and V(b) vs time into a text file.
I show the contents of the text file.

I'll bet that MatLab could deal with the contents of the text file (I'm not a Matlab user).

30.png
 
Last edited:
I am trying to import the results of a Spice simulation into Matlab, I know how to get the values etc from Pspice but how do I load it up on MATLAB using the load or textread command?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top