Specific interval of imported data

Hi,
I want to sort out a specific interval in my imported data. More specifically i want to use the data between row 24 - 48 and here's how far i've come:
import1=zeros(24,1);
for j=1:36
for i=[24:48]
import1(i,j)=allahus_2017till2021(i,j);
end
end
Now when i want to plot this, i get the numbers before 24 (0-24) as well as zeroes, see picture.
How do i write so that it starts from 24 and end at 48?
Best regards

回答(1 个)

KSSV
KSSV 2022-3-7
编辑:KSSV 2022-3-7
import1 = allahus_2017till2021(24:48,:);

1 个评论

That works, thank you!
But when i type that way and plot it, the x-axis will show 0-24 although it is the data between 24 - 48. Is there any way i can make the X-axis show the numbers of the interval (24 - 48) instead of amount of datapoints?
Cheers

请先登录,再进行评论。

类别

在 帮助中心 和 File Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

产品

版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by