ltspice2matlab
ltspice2matlab copied to clipboard
flag "double" will allow to also import NGSPICE raw files
Currently the "double" flag is not recognized. This flag signifies that all data is double precision (The LTspice default is that for .TRAN time is float64 and all other data is float32). This format can occur when numdgt is set above 8, however, it also is seen for NGSPICE raw files. I've added a diff that recognizes 'double'. (Note that there can be problems when the data is not from a .TRAN simulation.)
The same diff also shows a modification for when selected_vars is a string when calling LTspice2Matlab. In that case the program directly returns the data for the indicated trace. The old behavior is that selected_vars returns the index needed to retrieve the data for the trace but not the data itself. Currently it only works for one trace.
I attached the modified MATLAB file just for convenience.
-marcel lt2m.txt LTspice2Matlab.txt