Info

此问题已关闭。 请重新打开它进行编辑或回答。

I'm trying to get the string of names that i received from my previous statement , to write over to my excel spreadsheet but nothing is happening when i press run. I'm unsure what to do next?

1 次查看(过去 30 天)
SystThresh=90 ;
SystThresh1=120;
DiaThresh=60;
DiaThresh1=80;
isOK=(Systolic > SystThresh & Systolic < SystThresh1 & Diastolic > DiaThresh & Diastolic < DiaThresh1);
fprintf('%s is ideal\n',Names(isOK));
xlswrite('BPResults.xlsx',{'Ideal'});
xlswrite('BPResults.xlsx',Names(isOK),'Sheet1','A2');
  3 个评论
Walter Roberson
Walter Roberson 2018-4-13
When you say that Names is a string, do you mean that it is a string() array and indexing it with isOK is intended to return smaller string() array? Or do you mean that Names is a character vector, in which case indexing it with isOK would be choosing individual characters out of the character vector? Or do you mean that it is a cell array of character vectors?
What output is showing up for
fprintf('%s is ideal\n',Names(isOK));
?

回答(0 个)

此问题已关闭。

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by