fprintf statement help in code
显示 更早的评论
Below is a code that I am working on. For line 9 I need help coming up with what to put in the fprintf statement to fill in the '....' spaces. My instructions are to "use the size command in an fprintf command to tell the user how many scores are below the lower cutoff." I've tried to read about the fprintf statement, but I still can't seem to come up with the correct code. Any help? Thanks.
dataFromMyExperiment = 5.*randn(100,1)+10;
nbins = 100;
histogram(dataFromMyExperiment, nbins)
StandardDeviation = std(dataFromMyExperiment)
myMean = mean(dataFromMyExperiment)
lowCutoff = myMean - 2*StandardDeviation
highCutoff = myMean + 2*StandardDeviation
extremeLowValuesIndex = find(lowCutoff)
fprintf('................' ,....... );
actualLowValues = dataFromMyExperiment(extremeLowValuesIndex)
for thisLowScore =
fprintf('%6.3f is below the cutoff/n', actualLowValues)
end
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Data Type Identification 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!