Insert blank/NaN rows in a column
Show older comments
I actually want to plot yearly graphs 12 curves for 12 months each with a set of 24 values. I have acess the data from excel files and reshaped them in one cloumn 288 rows in total. What I want is gap between is each month with no connecting points between the curves. My solution is to introduce blank rows after 24th in each month. How can i do that?
Accepted Answer
More Answers (2)
Alex Mcaulley
on 21 May 2019
Do you mean this?
A = rand(288,1);
A = reshape(A,[24,12])
B = reshape(1:numel(A),[24,12])
plot(B,A)
Dheeraj Singh
on 21 May 2019
Hi,
You can reshape the matrix into a 24x12 matrix and directly plot
%suppose this is your data
val=rand(24*12,1)
%reshape this to 24x12
val=reshape(val,24,12);
plot(val);

I got the result for 12 months .....Since the plot seems very clutterred for 12 months, i'll show you the plot for 3 months instead of 12...
I got the following result for 3 months....

I hope this helps!!!
1 Comment
Mahrukh Farooq
on 22 May 2019
Categories
Find more on Discrete Data Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!