How do I convert a CSV into a .mat file?
조회 수: 157 (최근 30일)
이전 댓글 표시
Hi all! I'm very, very new to Matlab.
With that said, does anyone know how to convert a CSV file into a .mat file in the MATLAB environment? I've had a lot of trouble answering this question.
I attached a CSV file I'd like to convert as an example.
Thank you!
댓글 수: 1
Stephen23
2023년 2월 13일
"I've had a lot of trouble answering this question."
Use READMATRIX and SAVE. If you don't know what options you have for file import/export, start here:
채택된 답변
Dyuman Joshi
2023년 2월 13일
Since the csv only contains numeric data, use readmatrix to load the data in a variable
variablename=readmatrix('s1.csv')
and save accordingly
save('filename.mat','variablename')
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Search Path에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!