12 views (last 30 days)

How to do i divide my plot into different quarters

A. Sawas
on 6 Apr 2019

You need to decide how to divide the plot then plot each part on a separeat subplot.

For example the following code divides a sin signal into four parts:

t=linspace(0,2*pi);

d=floor(length(t)/4);

t1=t(1:d);

t2=t((1:d)+d);

t3=t((1:d)+2*d);

t4=t((3*d+1):end);

figure;

subplot(2,2,1); plot(t1, sin(t1));

subplot(2,2,2); plot(t2, sin(t2));

subplot(2,2,3); plot(t3, sin(t3));

subplot(2,2,4); plot(t4, sin(t4));

Opportunities for recent engineering grads.

Apply TodayFind the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
## 4 Comments

## Direct link to this comment

https://nl.mathworks.com/matlabcentral/answers/454754-divide-your-plot-to-four-quarters-and-plot-each-of-the-four-curves-in-a-separate-quarter-of-the-plot#comment_690520

⋮## Direct link to this comment

https://nl.mathworks.com/matlabcentral/answers/454754-divide-your-plot-to-four-quarters-and-plot-each-of-the-four-curves-in-a-separate-quarter-of-the-plot#comment_690520

## Direct link to this comment

https://nl.mathworks.com/matlabcentral/answers/454754-divide-your-plot-to-four-quarters-and-plot-each-of-the-four-curves-in-a-separate-quarter-of-the-plot#comment_690521

⋮## Direct link to this comment

https://nl.mathworks.com/matlabcentral/answers/454754-divide-your-plot-to-four-quarters-and-plot-each-of-the-four-curves-in-a-separate-quarter-of-the-plot#comment_690521

## Direct link to this comment

https://nl.mathworks.com/matlabcentral/answers/454754-divide-your-plot-to-four-quarters-and-plot-each-of-the-four-curves-in-a-separate-quarter-of-the-plot#comment_690561

⋮## Direct link to this comment

https://nl.mathworks.com/matlabcentral/answers/454754-divide-your-plot-to-four-quarters-and-plot-each-of-the-four-curves-in-a-separate-quarter-of-the-plot#comment_690561

## Direct link to this comment

https://nl.mathworks.com/matlabcentral/answers/454754-divide-your-plot-to-four-quarters-and-plot-each-of-the-four-curves-in-a-separate-quarter-of-the-plot#comment_690605

⋮## Direct link to this comment

https://nl.mathworks.com/matlabcentral/answers/454754-divide-your-plot-to-four-quarters-and-plot-each-of-the-four-curves-in-a-separate-quarter-of-the-plot#comment_690605

Sign in to comment.