Here we discuss the introduction and description of find in Matlab with proper codes and outputs. After running you get the following answer: ans 5. Then run the following code: getresult functionA (100,10) getresult. upto you to name it) or you can use the Matlab command window even. The second part is to create another Matlab file (i.e. Example: = find(A>1) will return column vector with logical true values. Then put the following code inside: function result functionA (N,alpha) result 5 return end. K = find(X 0 & X1, we must remember that here, the result will be a matrix of 1s & 0s. Below is an example to understand this find function: This function will return the first n indices for the non zero values in X. Let us use a logical operator ~ to locate the zero values. Let us now understand this concept with an example:
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |