MATLAB is not deleting requested values.
古いコメントを表示
I want to remove the first couple lines in an excel file as it is irrelevant information. I could do this in excel however, it would be much easier in Matlab as I have a lot of data files to import into Matlab.
Here is my code:
clear, clc, close all
AE_data = readmatrix('file')
AE_data(1:2,:) = [];
For some reason when I run this code it does not delete the rows. When i evaluate the specific line of code it deletes the rows. What am I doing wrong? I cannot figure out why Matlab will not delete these rows.
Thanks.
3 件のコメント
Jan
2023 年 2 月 20 日
"when I run this code it does not delete the rows. When i evaluate the specific line of code it deletes the rows." - Please explain, what this means. I sounds like a contradiction.
The code does delete the 1st and 2nd row. So I assume that your observation is not correct.
Steven Lord
2023 年 2 月 20 日
The code you've written does delete the first two rows in the copy of the data you loaded into MATLAB. It does not delete the first two rows in the file itself. Is the latter what you're trying to do?
Reed Smith
2023 年 2 月 20 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Data Import from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!