What Dth stands for?
3 次查看(过去 30 天)
显示 更早的评论
3 个评论
采纳的回答
Walter Roberson
2020-10-2
It means that you have a variable named D and that you want the value of D to indicate which row number of H to access. If D had value 7 then you would want the "seventh" row. If it had value 8 then you would want the "eighth" row. If it had value 19, you would want the "nineteenth".
Explicit values such as 7 are "Cardinal" numbers -- numbers that tell you how much of something there is.
Designations such as "first" ("1st"), "second" ("2nd"), "third" ("3rd") are known as "Ordinal" numbers, and talk about the position of something. https://www.mathsisfun.com/numbers/cardinal-ordinal-nominal.html
So when refering to wanting to use the value stored in D as a position to look at, English would often use Ordinals -- most of which end in "th" in English. To refer to D as designating an Ordinal (position) English might then refer to the
row .
might also be written as
or as
. It means much the same thing as using the content of D as counting the number of rows that need to be dealt with (with the implication that the first (D-1) are not being paid attention to.)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/369856/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/369859/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/369862/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/369865/image.png)
2 个评论
更多回答(1 个)
madhan ravi
2020-10-2
Dth stands for the row 2 , index it to the matrix and use sum().
5 个评论
Walter Roberson
2020-10-2
You should not be using rand() for this purpose. You should be using randi() .
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!