-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle missing time/source values for stepped simulations #3
Comments
I have the same problem when using LTspice2Matlab to read .raw file from .tran with .step. I looked at the ascii file. Although the time span (defined by me) is the same for all the steps in my simulation, the number of time points is different for the 3 steps. I think this is why LTspice2Matlab breaks down (not divisible by steps as you mentioned). Not sure how LTspice sets the number of points in time. I worked around on this with the ascii file. Since the time span is the same for all steps, I find the start time (min) and end time (max) and parse the data for each step without doing division by the number of steps. I only did ascii file. Hope LTspice2Matlab can work this out. |
Hi neil538, I have the same issue and I've created a workaround. A better way would be to change the returned data type for time simulation data to Time Table.
I can create a feature request and we can have this version in a fork with a clear statement that at least R16b is required. Looking forward to your reply. Regards Andreas |
There's a similar patch of code around line 697 for the ascii setting that throws up the same reshape error. Replacing those 3 lines with reserschnell's workaround seems to fix the issue. |
Hi all, I fixed it for my simulations by creating a struct in stead of a array. Struct handles the different data length per step in stepped simulations without problems. It is not very pretty, but I think it may be useful for others as well. Shall I create a pull-request? Thanks @PeterFeicht for updating LTspice2Matlab to work with XVII, I am using your file (with my small edit) extensively! |
The attached .raw file contains four steps of a DC Sweep (.dc) simulation from two separate .step commands. The number of data points is not divisible by 4, because in some of the steps the last source value is missing.
I have no idea why LTspice would save the data this way, but we should try to handle this case nonetheless. I also don't know whether this can occur for Transient (.tran) simulations, but the handling is the same in any case.
The text was updated successfully, but these errors were encountered: