File Exchange

image thumbnail

debugData( varargin )

version (2.48 KB) by yonathan nativ
debugging tool for complex enviorments


Updated 31 Jul 2016

View License

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.

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

Comments and Ratings (2)

can you uplode the radar simulation??. you was working on it .

You can stop all the debugging by simply changing one line at the beginning of the debugData function (enable the 'return')

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags