What is wrong with this arithmetic array?
古いコメントを表示
function modifiedReadings = CalibrateReadings(originalReadings, adjustVal)
% originalReadings: Array of temperature readings
% adjustVal: Value added to each element in the array of temperature readings
% Add adjustVal to each element of array originalReadings
modifiedReadings = [originalReadings adjustVal]
end
5 件のコメント
John D'Errico
2017 年 10 月 2 日
Why do you think there is something wrong?
Blair Hall
2017 年 10 月 2 日
per isakson
2017 年 10 月 2 日
- How did you call the function?
- Show the full error message.
Blair Hall
2017 年 10 月 2 日
Jan
2017 年 10 月 2 日
@Blair: You get the message, that for the input
[51, 53, 61, 62]
the output of your function is
[51, 53, 61, 62, 1]
but the wanted output is
[52, 54, 62, 63]
The instruction was to "add a value to the elements of the input". And than you ask in the forum? Something is going really wrong here.
Do you have problems to understand the meaning of the question? Then a Matlab forum is not the right location to solve this. The forum will not solve all these very basic questions for you, because this is your homework (or job, or interest).
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!