Hello everyone, I need your help.
I have a csv file which contain 100 lines of data with 3 values in each line. When i did csvread function and assigned it a name it resulted in a 100X3 matrix . I want to break data in 2 X3 matrices. I want to save all the set of 50 ( 2X3 matrices) as a variable. Please suggest me some solutions.???

 採用された回答

KSSV
KSSV 2020 年 10 月 23 日
編集済み: KSSV 2020 年 10 月 23 日

0 投票

A = rand(100,3) ;
[r,c] = size(A);
p = 100/2; % this gives 50
out = permute(reshape(A',[c,r/p,p]),[2,1,3]);

3 件のコメント

Shashank Tyagi
Shashank Tyagi 2020 年 10 月 23 日
Thanks Brother.It worked
KSSV
KSSV 2020 年 10 月 23 日
Thanks is accepting/ voting the answer.. :)
Shashank Tyagi
Shashank Tyagi 2020 年 10 月 24 日
Sure will do that .. :-)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

タグ

質問済み:

2020 年 10 月 23 日

コメント済み:

2020 年 10 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by