Read ngspice MOD

版本 1.7.0.0 (2.8 KB) 作者: KBT WARKBT
MOD of the original 'Read ngspice' to make it work on rework-18 the one that comes in fc-10 repo.
496.0 次下载
更新时间 2009/6/9

查看许可证

I removed assert instructions to keep some backwards compatibility (replaced with error), and modify the way to read data + minor details.

Note: complexity and compatibility increased but performance decreased in other to make it more flexible for further changes.

sim = ReadSpice(filename,varargin)

sim is a cell array that contains all simulations: name,
data and labels. Like: sim{i} = [name data labels]. For
extracting data use:
name=sim{i}(1,1);name=name{1};
data=sim{i}(1,2);data=data{1};
labels=sim{i}(1,3:end);
where i can take values from 1 to length(sim)
name (to view the simulation name given by ngspice)
data (to view the numerical data)
labels (to view how the data is labeled)

This script has been tested on raw (-r out.raw) data from
ngspice-rework18.

Usage example:
sim = ReadNGSpice('out.raw');
sim = ReadNGSpice('out.raw','version','18');
name=sim{1}(1,1);name=name{1};
data=sim{1}(1,2);data=data{1};
labels=sim{1}(1,3:end);
plot(data(1,:), data(6,:));
title(name);
ylabel(labels{6});
xlabel(labels{1});

引用格式

KBT WARKBT (2024). Read ngspice MOD (https://www.mathworks.com/matlabcentral/fileexchange/24221-read-ngspice-mod), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2006b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 SPICE files 的更多信息
标签 添加标签
致谢

参考作品: Read ngspice

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.7.0.0

Corrected bug while reading complex data

1.6.0.0

Validation structure changed. RFC for rework-17 and 19.

1.5.0.0

Added more validation.

1.2.0.0

Removed license and added acknowledge to original author

1.0.0.0