Matlab plotting

12:49 PM

The matlab code for plotting multiple figures in one main boxed frame is given below. Consider that we want to plot 9 graphs in one figure similar to figure 1 below. This blog post will be updated when required.
Figure 1: M x N matrix 
figure ;

subplot(3,3,1)  % makes a three into three metrix and place the graph in position 1 
plot (xxx)
hold on
plot (uuuu,'red')
plot (yyyy)

subplot(3,3,2) % put the result in place 2 
plot (XXXXX)
hold on
plot (XXXXa,'red')
plot (XXXXX,'green')

subplot(3,3,3)

subplot(3,3,4)

and so on

subplot (3,3,[8,9])   Plot the graph on two boxes i.e 8 and 9 

You Might Also Like

1 comments

  1. This comment has been removed by a blog administrator.

    ReplyDelete

Copyright statement

Copyright © 2015-2017 by Hadeed A Sher

All rights reserved. No part of this blog may be reproduced, distributed, or transmitted in any form or by any means, including photocopying, recording, or other electronic or mechanical methods, without my prior written permission. For permission requests, write to the blog author addressed “Attention: Permissions Coordinator,” at the contact form.


Disclaimer

This blog is about my PhD work and an archive to my engineering education. However, additional study material for the courses i teach and that i have studied is also archived here.
All the circuits in this blog are tested by myself under specific conditions. BE CAREFUL if you are experimenting them, the blogger and this blog are not responsible to any harm and or damage to yourself and your equipment.


Contact form

Name

Email *

Message *