Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/303987589

Import LTspice simulation results in Matlab

Research · June 2016


DOI: 10.13140/RG.2.1.4586.4569

CITATIONS READS

0 3,979

All content following this page was uploaded by Aisha Alhammadi on 15 June 2016.

The user has requested enhancement of the downloaded file.


The following example shows the steps to import LTspice simulation results in Matlab

1. For example, build inverting amplifier; which consists of two resistors, their values 1k and
1Meg, amplifier of type LT1014A, 15V DC voltage supply, and 1mV AC voltage supply.

Fig. 1 The schematic of the circuit in LT spice.

2. After choosing Ac analysis and run your circuit to plot the output voltage versus the
frequency, the plotting window appears.

Fig. 2 The plot of the Vout/Vin versus the frequency.


3. Click on the title bar of the plot window then select FileExport. After that the following
window occurs. Choose the desired plot to be exported. In the File field, choose the location
where you want to save the exported file. It will be saved as .txt.

Fig. 3 The export window.

Figure 4 The exported file saved as .txt extension.


4. Open the .txt and remove the left parenthesis and the text from dB to right parenthesis, as
show below.

Fig. 5 The modified .txt file for making Matlab able to read the file.

5. Now, open Matlab and write the following code in the m-file.

Fig. 6 The m-file code.


6. The following plot appears in the Matlab

Fig. 7 Matlab plot.

* The reference

http://web02.gonzaga.edu/faculty/talarico/eeng304/ho/exportdata.pdf
View publication stats

You might also like