Matlab find() function in script

by phyhari
Tags: '[', error, find(), matlab, script
phyhari is offline
Sep20-10, 05:29 PM
P: 2
Hi All!
Brief version:
I would like to use statement starting with [ in Matlab script. Is it possible, if yes, how?

Longer version:
I'm writing code in matlab. I need to find matrix indices, for which the statement M==10 is true. (I found find() function, which is perfect for the task).


It works perfectly within the command window, but not in my script.
I get an error message, stating: parse error at '[' ... not valid matlab script
Can you help, or I must write an algorithm for finding indices? :S

Thanks in advance!
Phys.Org News Partner Science news on
SensaBubble: It's a bubble, but not as we know it (w/ video)
The hemihelix: Scientists discover a new shape using rubber bands (w/ video)
Microbes provide insights into evolution of human language
Pythagorean is online now
Sep21-10, 05:47 AM
PF Gold
Pythagorean's Avatar
P: 4,212
Use (), not [] for the find argument
phyhari is offline
Sep21-10, 08:29 AM
P: 2
Thank you! :) That was the problem. As you can see I'm just started coding in matlab...

Register to reply

Related Discussions
math with action script (Joukowski's + action script = HOW!!?!?!?) Programming & Computer Science 1
MATLAB find function 4D array Programming & Computer Science 3
Matlab- Second moment of Area(I) Script Help! Programming & Computer Science 2
Does a function exist (prefferably in matlab) that finds a function in noise Math & Science Software 4
How do I find the Critical points of a multi-variable function using MATlab? Math & Science Software 3