简体   繁体   English

Writematrix 命令在 MATLAB 中不起作用

[英]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.我已经下载了用于从音频文件中提取特征的代码,并将这些特征存储在 Excel 中的矩阵中,但 writematrix 命令抛出错误,即参数名称无效:Sheet1。

The arguments for 'writematrix' function following the initial two are in name-value pair combination. 'writematrix' 函数的参数在最初的两个之后是名称-值对组合。 In this case, you should be able to proceed with your requirement by using the following:在这种情况下,您应该能够通过使用以下内容来继续您的要求:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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