Pregunta

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

¿Fue útil?

Solución

Ok so what I'm looking for is

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

nice and simple

Otros consejos

(1) you can use DISP(NUM2STR(DATA,FORMAT)) or FPRINTF to render the matrix more properly, but displaying a 100x700 matrix is really not a good idea.

(2) You are using Matlab, so I think Matlab should to the job of finding irregularities in a Matrix for you. What is the point of using Matlab if you do such a job by hand. I suggest to find the irregularities in your matrix with an algorithm (You could provide some details about the irregularities, maybe somebody will come up with an idea about how to do that).

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top