How in the world can you remember the syntax of all or most of the builtin functions without refering to help on section everytime you use it...

6 views (last 30 days)
help
  3 Comments
Tauseef Guard
Tauseef Guard on 8 Aug 2011
sir fangjun jiang : i'm a student of engineering in computer science and i 've good hands on programming languages like c, c++, java, sql.... But the most interesting i ve ever found is matlab because of its gigantic builtin functions, but the problem is that i have to refer for every single time to the help on section of the respective function to know how to deal with it...
I just wanna ask you weather we have any better way to remember the syntax of the functions like in java we have
System.Out.Println(); to display something on the monitor, here we can understand that it is a builtin function cause the first alphabet of the three words is a capital letter, its a trend that the java programmars have we never use it for user defined functions, in the same way we have hints on how to give the arguments to the functions...
In the same way can we have these kinda hints for the arguments in matlab builtin functions...?
Walter Roberson
Walter Roberson on 8 Aug 2011
Sorry, no; the functions that are currently "built in" to MATLAB in this release might perhaps have been written as .m functions in previous releases; likewise something implemented as a .m file in this release might become implemented as a built-in in a later release. built-in or not built-in is an efficiency issue for the majority of functions.
There _are_ some operations which are built-in because they involve internal behaviors: for example, although it is theoretically possible to calculate the bit representation needed to convert an integer in to the corresponding double precision number, only internal MATLAB behavior can mark the result as _being_ a double precision number. There is, though, no special naming convention for these fundamentally internal operations, and most people do not pay any attention to the fact that fundamentally internal behavior was involved.

Sign in to comment.

Answers (6)

Oleg Komarov
Oleg Komarov on 8 Aug 2011
From time to time I forget that to compute the min across rows I have to skip the second argument
min(A,[],2)
In general I am very bad at remembering things and I constantly use the:
  • "cancel left bracket > rewrite left bracket > wait for inputs hint"
  • or F1.
If I were to be examined on a specific problem and the help facilities were disabled I am afraid I will struggle to pass. I guess the difference, as ImageAnalyst pointed out, is wether you know about a certain topic or not and which path you chose to accomplish the task. The examiner will immediately be able to spot your level of knowledge.
  3 Comments
Sean de Wolski
Sean de Wolski on 8 Aug 2011
True Walter! I think I used those once only (before I knew how to use histc to keep the subs below their ACTUAL value).

Sign in to comment.


the cyclist
the cyclist on 8 Aug 2011
Experience.

Image Analyst
Image Analyst on 8 Aug 2011
Well the majority of functions I use are the same ones over and over again, so I know what they do and require. But for other functions I often have to refer to documentation. Often I can just type ( (a left parenthesis) and see the popup argument list. But sometimes I just click in the function name and hit F1 and help pops up pretty quickly.
  4 Comments
John D'Errico
John D'Errico on 8 Aug 2011
My point is that the syntax of very many functions is quite consistent from function to function. Consistent interfaces are chosen where possible. Default values are chosen as logical ones in context. Complaining won't help you. What will help you is to actually learn the tool you seem to be claiming you know how to use! I think the interviewer caught you on this - that you said you knew how to use matlab, when in fact, you have only the briefest of exposure to it.
Tauseef Guard
Tauseef Guard on 8 Aug 2011
Obviously sir complaining will never help me....
I was'nt actually complaining i was asking weather anyone who has an abundant experience in matlab has analyzed the syntax of builtin functions in such a way that one can keep remember how to use the functions and arguments to those functions.....

Sign in to comment.


Walter Roberson
Walter Roberson on 8 Aug 2011
All of the built-in MATLAB functions (excluding MuPad) have the same syntax (unless, that is, some of the toolboxes such as the Parallel Programming one introduce new syntax.)
I suspect you wanted to ask about the semantics of the built-in MATLAB functions. To which I would say that there are too many functions and too many options for anyone to be realistically expected to remember them all.
Experience will lead you to use some functions much more than others; those you will get to know all the major options of.
If you are going for an interview for a particular kind of work, it would be a good idea to review the relevant functions so you can at least talk in general terms even if you do not have all the options memorized. For example if you were going for a job involving animation, I would suggest spending some time reviewing camera and lighting positioning, but if you were going for a job involving (say) wireless communication channels, then I would consider it unfair for the interviewer to lower your mark for not knowing the various lighting models. (Indeed, in my workplace, we would not be permitted to ask questions about areas of knowledge other than the ones described in the job posting.)
  1 Comment
Tauseef Guard
Tauseef Guard on 8 Aug 2011
Thank you sir for exchanging your thoughts....
Its always nice to have some suggestions from experienced people like you'll ( image Analysts ) to form a strengthing platform right from the beginning...
Regards tauseef...

Sign in to comment.


Jan
Jan on 8 Aug 2011
Reading the HELP text is not a bad idea. A lot of the built-in commands get more features in new releases. If I had just learned how to use them, I would not have a chance to see them. E.g. FIND and UNIQUE got the 'first' and 'last' after v6.5, ODE45 accepts function handles and anonymous functions, SAVE handles the -struct flag and FOPEN lost is ability to open VAX-D files.
In addition there are a lot of features, which are not written to the docs. They can be found by reading the M-files of the toolbox functions only.
Learning the semantics once and completely is not sufficient to be uptodate with the dynamically growing features of MATLAB. Therefore I suggest to read the HELP, DOC and the release notes again and again.

Fangjun Jiang
Fangjun Jiang on 8 Aug 2011
My answer:
  1. There are hints available, both in Command Window and M-editor as described by Oleg.
  2. You can use "Tab" key to search for functions if you vaguely remember the starting letters of the function, both in Command Window and M-editor. For examle, type min and hit Tab key, it will show you a list of functions starting with "min".
  3. The MATLAB functions could or should be organized following some category, or use the object.method approach, such as Simulink.Bus.save. I think many are on the way, or at least for the new ones.
  1 Comment
Tauseef Guard
Tauseef Guard on 8 Aug 2011
Thank you sir for your valuable suggestion...
From all the suggestions and tips from you researcher's i've learned today, i've come to a conclusion that it doesnt matter giving a shy at the "help on selection". On any perplexed situations, when you kinda experienced personalities use it regularly then i'm just a beginner...
Please keep suggesting me whenever i pose any querry in future it will be worth than reading hundread's of superficial articles on the relevant topics... Once again thank you one and all...
Regards tauseef....

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!