0
for n = 1:2
    for n = 1:100

        % some logics

    end
    subplot(2,n,1);
    ploterrhist(error)
end

I only get one graph and I don't even see subplot. Why?

1 Answer 1

2

Try something like this

for i = 1:2
  for j = 1:100
    % some logics
  end
   subplot(2,1,i);
   ploterrhist(...)
end
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. You are right. I used the same n over. I changed to 1:2 and i. But they still show up as one graph and overwrites thep preivous one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.