How to find out the position of 0 element of vector in MATLAB

How to find out the position of 0 element of vector in MATLAB


For example, your vector is a
a=[1 3 0 3 0];
Use the following sentence directly
ind = find(a==0)
Calculated ind = 3.5
So the third and fifth elements in a are 0
I don't know if you asked



Matlab to calculate the number of negative elements in vector
The vector is x = [8,1, - 3, - 5]. The second question is to find out the largest and smallest elements in X, not max, min


Calculate the number of negative elements in the vector
length(find(x



What are the symbols for absolute and average values?


Average value, absolute value



-The sign of the sum of 3.75 and 11 / 3 is (), and the absolute value of the sum is (), and is equal to ()


-The sign of the sum of 3.75 and 11 / 3 is (-), the absolute value of the sum is (1 / 12), and the sum is equal to (- 1 / 12)