フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Please can somebody help on this

1 回表示 (過去 30 日間)
Tijjani Aminu Kuda
Tijjani Aminu Kuda 2015 年 11 月 7 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I came across a function i intended to use, and it started by creating arrays of ones like this
zn = ones(n,1)*10^100.
Please can somebody tell me the meaning and the benefits. thanks
  2 件のコメント
Stephen23
Stephen23 2015 年 11 月 7 日
編集済み: Stephen23 2015 年 11 月 7 日
There are many possible reasons, but we can't tell you which one is the best explanation, unless you actually show us that function. You can upload code using the paperclip button, and then pressing both the Choose file and Attach file buttons.
Geoff Hayes
Geoff Hayes 2015 年 11 月 7 日
Tijjani - all that line of code
zn = ones(n,1)*10^100;
is doing is creating an nx1 array of ones and multiplying each element by 10^100. Try doing the above and go through different values of n to see the above work. Perhaps the author of the code is just assigning some max value to all elements in this array.
But, like Stephen said, we cannot tell why the author may want to do this without seeing the code.

回答 (0 件)

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by