change extension from .mat to .csv or .xls
Afficher commentaires plus anciens
i have a matlab code but i want to test it with my own data. and the problem i couldn't find a way to insert my own data ...can anyone please help me to change those code lines into a way that i could insert my csv or xls data
here the exemple :
% Get input data
fname=strcat(dirname,'data',num2str(file),'.mat');
fname1=strcat(fdirname,'forecast',num2str(file),'.mat');
load(fname);
data=dataout;
1 commentaire
TastyPastry
le 13 Oct 2015
Why do you need to change the file extension if you're using your own input .csv or .xlsx? You should be able to import your own data using csvread(), xlsread() or fopen() with textscan().
Réponses (1)
Walter Roberson
le 13 Oct 2015
[filename, pathstring] = uigetfile(dirname);
fname = fullfile(pathstring, filename);
data = xlsread(fname);
Catégories
En savoir plus sur Search Path dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!