Professional Documents
Culture Documents
Prepared by
Name ID No.
1. Theoplos Habtmu UGR/20088/12
2. Yididya Getachew UGR/19767/12
Objectives:
Get a better understanding of matlab
Improve our coding ability
To find simple solution in a short time
Apparatus Used:
Computer
Matlab Software
find:
Find indices and values of nonzero elements
Syntax:
k = find(x)
[i,j] = find(X)
[i,j,v] = find(X
Description
k = find(x):this will return the index of array x which point to non zero
elements
[i,j] = find(X):this will return raw and columns of non zero elements in a
matrix
[i,j,v] = find(X): returns a column vector v of the nonzero entries in X, as well as
row and column indices.
In general the find function helps to find if you just how many values satisfy some criterion
X= 1:0.1:5;
Y= sin(x);
Ind = find (x==min(x(y<0)))
>>throwball
Ind=
23
References
Course material
Matlab help