Question

Copy and run the MATLAB program in this blog program to run for n = 13 subplot(2,2,n-7) ...

Copy and run the MATLAB program in this blog program to run 
for n = 13
      subplot(2,2,n-7)
      F = fft(eye(n));
      plot(F)
      axis square
      axis off
      title(['n = ' int2str(n)])
   end
0 0
Add a comment Improve this question Transcribed image text
Answer #1

The maximum number of subplots you can have in a matlab program is 4.

Depending on the number chosen, the plot will be plotted in that quadrant.

So fixing the error in the code -

for n = 13
      subplot(2,2,n-9)
      F = fft(eye(n));
      plot(F)
      axis square
      axis off
      title(['n = ' int2str(n)])
   end

you get a plot like this -

n=13

To make the graph occupy the entire space, you can remove the subplot line and your code will be like -

for n = 13
      F = fft(eye(n));
      plot(F)
      axis square
      axis off
      title(['n = ' int2str(n)])
   end

and the corresponding plot will be -

n=13

Add a comment
Know the answer?
Add Answer to:
Copy and run the MATLAB program in this blog program to run for n = 13 subplot(2,2,n-7) ...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT