This command will search for all occurrences of the value 0 in the matrix A and return their indices along the second dimension of the matrix.

For example, if A is a 3x3 matrix with the following values:

A = [1 0 2; 
     0 3 4; 
     5 6 0]

The command find(A==0,2) will return the following vector:

[2; 3]

This indicates that the value 0 is found at the second and third positions along the second dimension of the matrix A.

matlab findA==02

原文地址: https://www.cveoy.top/t/topic/bWeu 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录