saving a data as .m with double elements
이전 댓글 표시
Hİ everyone,
How to save a dataset (like .csv) as .m workspace with all elements as double into this folder ?
THANKS
답변 (1개)
You can use save() function to save the dataset into your workspace.
Here are the steps to do it:
1) Create a new structure to store your dataset.
data = struct('dataset', dataset)
2) Use save function :
save(['folder_path' 'workspace.mat'], 'data')
댓글 수: 4
feras
2023년 6월 25일
Stephen23
2023년 6월 25일
"the file is .csv file and i want to use it in Matlab by saving as .m workspace with all elements as double into this folder."
Why not just use READTABLE directly on the CSV file?
So far there does not seem to be any good reason for duplicating the data in an Mfile.
Jayant
2023년 6월 27일
feras
2023년 6월 29일
카테고리
도움말 센터 및 File Exchange에서 Database Toolbox에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!