- The page numbers 91 and 92 seems to imply, that there are some more hints.
- I would omit "median(x) median" and "mean(x) mean".
- cd is mire direct than pwd to get the current directory.
- "sprintf(x) formated data to a string" does not mention the more interesting format specifiers.
- fprintf is important also, while "disp(x) Displays the string x" leaves out the real power of disp to display all Matlab arrays.
- The leaner a cheat sheet, the better. So "It is easy to create functions:" does not help.
- "bsxfun(fun,A,B) fun is elementwise applied" does not hit the point of the auto-expanding of singleton dimensions.
- "int16(x)=y" is no valid Matlab syntax.
- Matlab does not have a "sqr" function.
- "find(A>5) nds element nr. >5": No, FIND does not determine the number, but the indices.
- "B=repmat(A,m,n) Makes B from A" does not hit the point of the replication.
- kron() is missing, but it solves many problems.
- zeros, ones, NaN, Inf could be summarized in a single line.
- "figure(j) graphics object j, j is an integer": The handle of figures can be an integer for backward compatibility. Non-integer handles are safer.
- "get(j) returns information on figure j": get operates on all HG-objects and a lot of other objects also, see help get.
- "subplot(a,b,c) Creates plot aXb matrix and puts figure into position c" is not clear. subplot does not create a figure, but an axes object.
- In "print(figure(CurrentFigure),'-depsc2','path\image.eps')" the figure command is useless. Better: "print(FigureHandle,'-depsc2','path\image.eps')".
- "isnummeric(x)" has one "m"
- The difference between "&&" and "&" is important.
- Duplicates can be omitted: ver, [A;B] and x=[1; 2; 3], diff,
- The most important detail of inv(A) is, that it is usually not required and \ is more efficient.
- "size(x) rows and cols" matters matrices only, but size has more features.
What would you add to my Matlab cheatsheet ?
6 ビュー (過去 30 日間)
古いコメントを表示
I am always adding and removing stuff for my Matlab cheatsheet and would like everyones opinion on what they would add/remove.
I like to have even the very basic stuff there so i can share it with others.
Cheers ps. would love to hear what you are using Matlab for when you suggest changes
0 件のコメント
採用された回答
Jan
2013 年 8 月 25 日
編集済み: Jan
2013 年 8 月 25 日
This means, that I'd apply fixes at first, omit redundant and rarely needed information, before adding further commands. And finally I'm not sure for which kind of user this sheet might be useful for. You personally have learned enough Matlab during creating the sheet, that you do not need it anymore. And for a Matlab beginner would be confused by the omitted or inaccurate details.
その他の回答 (2 件)
Jan
2013 年 8 月 18 日
- j:i:k does not create j, j+i, ..., k, see: 1:2:4
- "while switch" might mean "switch case"
2 件のコメント
Image Analyst
2013 年 8 月 19 日
When you're adding x and y you don't need the dot, you can just do x+y. You might run it through a spellchecker to correct numerous spelling errors. You might add intmax and realmax to the list of useful built in functions.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Entering Commands についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!