How can I reshape the given file into excel file ?

2 ビュー (過去 30 日間)
Deepesh Kumar Gupta
Deepesh Kumar Gupta 2022 年 4 月 4 日
i want this file data into [68*1080] excel sheet , so that i can proceed for further calculation, please help me with matlab code.

回答 (2 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2022 年 4 月 4 日
#Let's suppose final name is Test_CSV.csv
data=readmatrix('Test_CSV.csv');
xlswrite('test_data.xlsx',data);
You may extract the required data sizes using array indexing.
Like
data(1:68,1:1080)
There are so many related threads, please do search in MATLAB Answer.

Voss
Voss 2022 年 4 月 4 日
Here's one way to do that:
C = readcell('matlab.csv');
C = cellfun(@str2num,C,'UniformOutput',false);
C(cellfun(@isempty,C)) = [];
M = cell2mat(reshape(C,68,[]));
writematrix(M,'matlab_reshape.csv');

カテゴリ

Help Center および File ExchangeData Import from MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by