BasedTaco

u/BasedTaco




r/matlab•

I'm getting some wonky stuff from my code where the first iteration of my for loop will always return a value for one of the x values as 20 orders of magnitude higher than pretty much every other value I have. This always occurs for the one x value for only the first iteration.

I have the relevant section of code below, if anyone could tell me what's going on, it would be much appreciated. I've been pulling my hair out about this for a week.

randmat = 6.*rand(100,2);
error = 10;
e = 10^-6;
count = 0;
answers = [];
telapsed = [];
for i = 1:100
    a = randmat(i,1);
    b = randmat(i,2);
    tic;
    while abs(error) > e
        count = coun
115


You've reached the end of this feed.