Search code examples
matlabmatlab-uitable

Browsing a variable during a function call


While running one of my programs, I need to scan through a rather large matrix (100*700) to identify irregularities.

My initial idea was to have a breakpoint in place when I need to do a data scan, but I'm not a fan of that solution.

What I'm looking for would be equivalent to calling openvar('A') during a function call (except I can't presently do that). The alternative, disp renders the matrix poorly.

Any hints?

Edit:
A sample example of what I'm trying to do:

function main

time = 0:pi/100:4*pi;
inV = (1:100)';

data = 10*diag(rand(100,1))*sin((inV)*time);

error = ceil(350*rand); % find the anolmaly
data( ceil(100*rand),error:(error+20))= -13;
test = true;

openvar('data')

while test

    close all;
    figure(1)
    hold on;
    plot(data')

    test= (input(strcat('Further review? ')));
    if (test)
        data(test,:) = [];
    end
end

If I used a breakpoint, I could scan through the data knowing that -13 is wreaking havoc on it (-13 is some random number I used, in reality, it's far more complicated). However breakpoints only exist during the current Matlab session.

I'm using Matlab 2012a


Solution

  • Ok so what I'm looking for is

    t = uitable;
    set(t,'Data',data)
    

    nice and simple