debugData( varargin )

版本 1.0.0.0 (2.5 KB) 作者: yonathan nativ
debugging tool for complex enviorments
31.0 次下载
更新时间 2016/7/31

查看许可证

This function changed my life :)
This function allows you to save as many variables along your run from any point in the code.

When starting the run, clear all data in debugData by calling debugData('reset')
During the run call debugData from any point in the code to store data, the function will concatenate data automatically.
At the end of the run call debugData with debugData('plot') to plot all its content
You can extract a specific variable by using: var = debugData('varName');
You can view which variables are stored by calling variables = debugData('fields');

The function supports the saving of structs and arrays.
It concatenates the data in rows.

Example:
a = randn(100,1);
b = zeros(size(a));
debugData('reset')
for n = 2 : numel(a)
b(n) = b(n-1) + a(n);
debugData('ab', [a(n) b(n)]);
end
debugData('plot')

引用格式

yonathan nativ (2024). debugData( varargin ) (https://www.mathworks.com/matlabcentral/fileexchange/58459-debugdata-varargin), MATLAB Central File Exchange. 检索来源 .

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

Community Treasure Hunt

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

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