如何解释r1与c1的数值的意思
9 views (last 30 days)
Show older comments
clear;
[X,Y]=meshgrid(10:10:1000);
[r1,c1]=find(X<=Y&0<Y&Y<=400&X>0)
代码如上
这样会生成一个变量r1与c1,这两个变量里的值是什么意思
0 Comments
Answers (1)
Aditya
on 23 Feb 2024
Hi 雪明 邓,
I understand that you're looking for an explanation of the numerical values in the variables “r1” and “c1” produced by your MATLAB code. The values in “r1” represent the row indices and the values in “c1” represent the column indices of elements in matrices “X” and “Y” that meet the specified conditions: “X” is less than or equal to “Y”, ”Y” is positive and less than or equal to 400, and “X” is positive.
In essence, “r1” and “c1” tell you the positions of the points in the grid formed by “meshgrid” where the conditions are true.
For more information on “find” function, refer to the MATLAB documentation here:
I hope this helps!
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!