Hello,
I have a variable of size 40 x 40 x 2 x 102400 and i want to seperate this variable to two 40 x 40 x 102400 variables. I plan to use the data on python, but have problems with the size and dimensions of the data. I don't know if this is an easy or a complex problem but i am new to matlab and couldn't find how to do this.

 채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 7월 31일
편집: KALYAN ACHARJYA 2019년 7월 31일

1 개 추천

Lets var is the main variable-
var1=var(:,:,1,:);
var2=var(:,:,2,:);

댓글 수: 4

But this leaves me with a 40 x 40 x 1 x 102400 , how do i remove that 1.
should i use
squeeze(var1)
madhan ravi
madhan ravi 2019년 7월 31일
Yes.
Thanks @Madhan
Olca Orakci
Olca Orakci 2019년 7월 31일
Thank you both :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Structures에 대해 자세히 알아보기

제품

릴리스

R2018b

질문:

2019년 7월 31일

댓글:

2019년 7월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by