简体   繁体   中英

Writematrix command not working in MATLAB

sname='Sheet1';
startingColumn='A';
nextRow='1';
filename = 'C:\Users\vvb\Documents\New\ltp.xlsx';

 ltp_hist_uper=hist(ltp_uper,10);
 ltp_hist_lower=hist(ltp_lower,10);
 
 ltp_full=[ltp_hist_uper ltp_hist_lower]; % contatinate both uper and lower vectors
 range=sprintf('%s%d',startingColumn,nextRow);
writematrix(ltp_full,filename,sname,range);

I have download this code for extracting features from and audio file and store those features in matrix in Excel but writematrix command is throwing an error ie Invalid parameter name: Sheet1.

The arguments for 'writematrix' function following the initial two are in name-value pair combination. In this case, you should be able to proceed with your requirement by using the following:

writematrix(ltp_full, filename,'Sheet', sname, 'Range',range);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM