What is missing from MATLAB?
I'm curious, is there something you wish to do with MATLAB but you can't, maybe something you can do with other similar software but can't with MATLAB?
For new entries, please use the follow-up thread here. Please do not post new answers in this thread.
470 Comments
Time DescendingCompare sldd files and publish a HMTL report using Matlab script:
I can compare .slx, .m, etc. files using the visdiff function and publish a report using the publish function like this:
compare = visdiff('File1.slx', 'File1_changed.slx');
publish(compare, 'format', 'html');
But I can´t do the same with .sldd files:
compare = visdiff('File1.sldd', 'File1_changed.sldd');
publish(compare, 'format', 'html');
Error using visdiff
Unable to compare 'C:\basic\File1.sldd' and 'C:\basic\File1_changed.sldd' without opening the Comparison Tool.
Why if I can generate an HTML report using the Comparision Tool in the same way, both for .slx and .sldd files?
I want to use the SymbolicTransformer function of python GPlearn
Why does the paid matlab not have some functions on free python? I can't understand
How to visualize the changes in dlarray/weight distribution with histograms in deep learning?
Histogram displays how the trend of tensor (weight, bias, gradient, etc.) changes during the training process in the form of histogram. Developers can adjust the model structures accurately by having an in-depth understanding of the effect of each layer.


I very much hope that the official version will strengthen the readstruct function in the future! Lack of complete uniformity to support more format requirements.
Missing: ability to set multiple bits within the same word, by bit number.
Currently, if you try something like
bitset(A, [5 3])
then you get back a vector of values, setting each of the bits in turn, instead of setting all those bits within a single word.
You have to resort to things like
bitor(A, sum(bitset(0, [5 3])))
- action recognition: https://github.com/open-mmlab/mmaction
- video understanding, X3D: https://github.com/facebookresearch/SlowFast ,https://github.com/kenshohara/3D-ResNets-PyTorch
- reID: https://github.com/JDAI-CV/fast-reid
- track: https://github.com/ZQPei/deep_sort_pytorch,https://votchallenge.net/challenges.html
- Metric Learning: https://github.com/KevinMusgrave/pytorch-metric-learning
- image Classification: efficient,https://github.com/lukemelas/EfficientNet-PyTorch
- object detection: Centernet, https://github.com/xingyizhou/CenterNet , efficientDet, https://github.com/google/automl/tree/master/efficientdet,detectron2,https://github.com/facebookresearch/detectron2 ,PointRCNN,https://github.com/sshaoshuai/PointRCNN
- face recognition: insightface, https://github.com/deepinsight/insightface, sphereface,https://github.com/wy1iu/sphereface, arcface,https://github.com/ronghuaiyang/arcface-pytorch
- Semantic segmentation, instance segmentation,https://github.com/facebookresearch/maskrcnn-benchmark
- deeplearning preprocess data: https://github.com/NVIDIA/DALI
- StyleGAN: https://github.com/NVlabs/stylegan
- DeepNetwork Architecture:Mnasnet,https://github.com/tensorflow/tpu/tree/master/models/official/mnasnet
- deepnetwork inference performance: https://github.com/microsoft/onnxruntime ,https://github.com/zuoqing1988/ZQCNN
and so on....
The above are influential applications of deep learning in various aspects, but it is difficult to reproduce in matlab. Although Matlab2019b version supports automatic differentiation mechanism, it is still difficult to implement algorithms in matlab. The efficiency of the differentiation mechanism is not high, and many operators do not support it. I tried to implement the more famous yolov3/v4 algorithm with the latest MATLAB2020a version, but it is still not satisfactory
In summary, my personal suggestions are like my personal answer above, and I hope that future versions can improve a lot!
以上都为深度学习在各个方面有影响力的应用,但是在matlab中复现困难,虽然Matlab2019b版本支持自动微分机制,但仍然不易在matlab实现算法,微分机制效率不高,很多operators也不支持。。。
总之,我的个人建议就像上面的个人回答建议一样,我希望将来的版本可以有所改善!
- action recognition: https://github.com/open-mmlab/mmaction
- video understanding, X3D: https://github.com/facebookresearch/SlowFast ,https://github.com/kenshohara/3D-ResNets-PyTorch
- reID: https://github.com/JDAI-CV/fast-reid
- track: https://github.com/ZQPei/deep_sort_pytorch,https://votchallenge.net/challenges.html
- Metric Learning: https://github.com/KevinMusgrave/pytorch-metric-learning
- image Classification: efficient,https://github.com/lukemelas/EfficientNet-PyTorch
- object detection: Centernet, https://github.com/xingyizhou/CenterNet , efficientDet, https://github.com/google/automl/tree/master/efficientdet,detectron2,https://github.com/facebookresearch/detectron2 ,PointRCNN,https://github.com/sshaoshuai/PointRCNN
- face recognition: insightface, https://github.com/deepinsight/insightface sphereface,https://github.com/wy1iu/sphereface, arcface,https://github.com/ronghuaiyang/arcface-pytorch
- Semantic segmentation, instance segmentation,https://github.com/facebookresearch/maskrcnn-benchmark
- deeplearning preprocess data: https://github.com/NVIDIA/DALI
- StyleGAN: https://github.com/NVlabs/stylegan
- DeepNetwork Architecture:Mnasnet,https://github.com/tensorflow/tpu/tree/master/models/official/mnasnet
- deepnetwork inference performance: https://github.com/microsoft/onnxruntime ,https://github.com/zuoqing1988/ZQCNN
and so on....
The above are influential applications of deep learning in various aspects, but it is difficult to reproduce in matlab. Although Matlab2019b version supports automatic differentiation mechanism, it is still difficult to implement algorithms in matlab. The efficiency of the differentiation mechanism is not high, and many operators do not support it. I tried to implement the more famous yolov3/v4 algorithm with the latest MATLAB2020a version, but it is still not satisfactory
以上都为深度学习在各个方面有影响力的应用,但是在matlab中复现困难,虽然Matlab2019b版本支持自动微分机制,但仍然不易在matlab实现算法,微分机制效率不高,很多operators也不支持。。。
Ability to use a multidimensional logical array to substitute for multiple dimensions while still specifying other dimensions.
For example if you build an ROI that is going to be 2d, and you cannot currently do things like
array(mask2d, :)
array(mask2d, :, :)
to talk about the rgb elements associated with the mask.
In the particular case of ROI mask you can repmat(mask, 1, 1, 3) but there are plausibly times where you might want to do something like
array(2, mask)
with you wanting to substitute a 2d logical array for the second and third dimension.
- Native support for custom keyboard shortcuts, i.e. let me point to a function to execute when a key-combo is pressed. Currently I can put them in the "Favorites" and add them to quick-access and order them for Alt+1, Alt+2, etc, which is alright, not great if you want more than 2 or 3. There is also theEditorMacro from File Exchange, which is good, but would be nice if it was baked-in to Matlab so I could more easily share helper functions with colleagues.
- Better git support. VS Code is light-years ahead here, for example.
- Extended syntax highlighting. Built-in keywords are highlighted, let's add a color for variables, functions calls, and class constructors/static methods. The example screenshots here are a nice example of how much more readable code is with functions highlighted.
- Bring the improvements of function parameter help text from live scripts to the regular .m files
Being able to compile a desktop standalone app made in app designer that works on a 32 bit Windows.
DeepNetwork analyze: https://ww2.mathworks.cn/matlabcentral/answers/475571-how-to-get-the-calculation-amount-of-deep-network-flops-analyze-network-app-does-not-seem-to-count
DeepNework object detection: https://github.com/weiliu89/caffe/tree/ssd ,in this repository, I do't know how to design my ssd netwok in matlab, only fast/faster RCNN, yolov2 algorithm can support, i can't free design( ▼-▼ )
DeepNework face and key point detection:https://github.com/kpzhang93/MTCNN_face_detection_alignment
DeepNework openpose detection:https://github.com/CMU-Perceptual-Computing-Lab/openpose
Better programatic suport for formating and manuplating live scripts, ideally full markup support in the live script enviroment.
See https://www.mathworks.com/matlabcentral/answers/282820-programmatically-run-and-export-live-script. but with mfilename() or dbstack() working as expected.
Live scripts have the ability to use markup like commands to autoformat text (https://www.mathworks.com/help/matlab/matlab_prog/format-live-scripts.html). Imbracing markup a little more and allowing the live editor to freely switch between formated and markup views.
Allow formated text to be procedurally generated by the program. I'm conducting various trials or expirments in a live script and keeping track of the trial number with a variable. Allowing that variable to be inserted as a header so it is tracked in the table of contents would save time formating the report and allow more time for experimentation.
It would be nice and make life a lot easier if bsxfun() has mtimes functionality or if 3D matrices can be matrix multiplied with just an (asterisk *) in later versions . While trying to matrix multiply between two 3D matrices it's quite frustrating.
Syntax highlighting that picks up fields of structures, not just the structure names themselves.
I want to know where I use a given field, and to be able to universally alter all uses if I rename it, as you can with variable names, structure names, etc.
Currently, in MATLAB live script (up to version 2018b), it don't have features to show or hide the code section. Therefore, we need to use workaround solution (https://www.mathworks.com/matlabcentral/answers/393021-how-to-fold-up-code-in-live-script) , hopefully, next release will include this feature in live script.
As a regular user of object oriented programming one of the things I miss most from C++ (where I started) is the ability to pass handle-derived class objects around using a const property. I use handle-derived classes a lot (~95% of my classes) and their ability to pass by reference is very nice, but having no control over whether they can be edited or not is frustrating.
A colleague of mine was once querying how something could be changed in a class I had written because it had immutable set access. So I had to explain that because it had public get access any code could quite happily get hold of the object and make changes to it, the only thing immutable means is that a whole new object itself cannot be set.
I suspect wishing for this is fighting against the type of language Matlab is and other scripting-based languages maybe also don't offer constness (and even in C++ using things like boost shared pointers can have the same effect).
The editor tab has buttons to comment out the selected lines and to remove comments from the selected lines. In addition, it would be nice to have a button to toggle the comment status of all selected lines--that is, make the highlighted regular lines into comments and make the highlighted comments into regular lines. I would gladly sacrifice the comment wrap button (which I never use) for such a toggle option, if screen real estate is an issue.
Neither textscan nor readtable can handle 'X' format string; whassup w/ that?
Why are hex data presumed to not be in text file with other data such as date/time strings or in files for which one or the other is the obvious higher level tool?
Is it possible to have the answer in latex form by default in command window?
The equations would be much more readable and understandable.
It could save lots of time , for instance in mupad by default the results are in latex form.
TABLE type needs display format by variable similar to the DATETIME object. Having to set global application format is a nuke for a fly-swatter. Sample--
>> t(:,[1 2 6 7])
ans =
Acct Pool Corpus Value
______ ____ __________ __________
S62671 4 2e+05 2.0369e+05
B62630 7 1.0545e+06 1.0561e+06
C62730 7 5.292e+05 5.3007e+05
C62731 7 3.116e+05 3.1202e+05
S62668 8 79527 94990
>> format bank >> t(:,[1 2 6 7])
ans =
Acct Pool Corpus Value
______ ____ __________ __________
S62671 4.00 200000.00 203694.22
B62630 7.00 1054497.48 1056134.46
C62730 7.00 529200.84 530067.94
C62731 7.00 311601.19 312017.40
S62668 8.00 79526.58 94989.65
>>
Default of format short mixes up integer values and non- so nothing aligns well plus insufficient range; since are accounting figures format bank fixes it for the two columns that are dollars/cents, but turns the integer Pool number into float that's ugly plus everything at the command line is also in bank format which is inconvenient for other uses as well.
"... horizontal placement. Why not 'top, middle, and bottom'?"
Because top, middle, and bottom are vertical alignment, not horizontal alignment.
"Should be included in the help file associated with 'text'?"
In the help page: "For a full list, see Text Properties", which takes you to the page describing all of properties of the text object. These are listed in their own dedicated help page (just like with every other graphics object).
Perhaps more enhancement than missing, but...
A search function that is tolerant of variable data types in the target object. Example is a cell array of mixed text/numeric types that need to find a given text within. At present (afaik, anyway) there is no function that will search the cell array ignoring the cells containing other than text content. If one constrains the search to the locations with just text by logical addressing or such, then the result is consistent within that subset but relating that set of locations back to the location in the original is not necessarily trivial.
Oops, turns out it is there. I just tried 'VerticalAlignment','top' and it works. Should be included in the help file associated with 'text'?
When inserting text into a figure, Matlab gives 'left, center, or right' as options for horizontal placement. Why not 'top, middle, and bottom'? I have a vector of text strings, the top of which I want to position at the top of the graph, but the placement is automatically 'middle'. The length of the vector changes from time to time. It would be clumsy to have to re-calculate the placement coordinates based on the length of the vector. Easier if I could just say 'top'.
textscan has only limited subset of the allowable formatting strings -- specifically, '%X' for hex data is missing. Why? Are we supposed to not ever have hex data for input? Why can't/doesn't it handle all available forms as are provided in the underlying C i/o library with fscanf and friends?
Quite a lot on the graphics side...just a couple to start reminded by the Answer I just gave (for about the umpteenth time) on how to label grouped bar graph--
- bar graph interface/modifications terribly difficult; labeling the bars in a grouped bar plot one of the most egregious oversights.
- no builtin hatching patterns yet after 30 years...whassup w/ that; had 'em w/ Calcomp plotters in the '60s...
- don't have consistent decimal format labelling by default on axes -- butt ugly; at least the numeric format (finally!!!) makes it a little easier but why have to fixup such trivial stuff manually?
I know there are quite a number of other things that just make me cringe or my teeth itch but I'm not thinking of them at the moment -- those two came now because of the question...
I'd like to be able to get pricing information for a proposal without waiting for a sales contact. It is frustrating that most of the information is online, but key parts are withheld.
I'm particularly concerned with Matlab coder. I have a student copy I paid either $10 or $29 for. Home users can't get it all, I hear. An academic user (my advisor) pays more for MATLAB, but Coder isn't listed as an option. Is that because it's included, or because it's not available, or because there's some special process for getting it?
Why so complicated? I just want my advisor to be able to compile a key part of the models I produce so they run at comparable speeds. She can't use my mex files because we are on different operating systems.
What I miss the most is better forum for the community.
We need Math Equation support through MathJaX (Like in StackExchange communities).
We need better editor for answers.
We just need a StackExchange based forum for MATLAB with all the features.
Something like:
I would like to have the ability to overload subsref and subsasgn separately for . [] () and {} separately. For example: subsref_square_bracket, subsref_dot, etc.
Now when you overload subsref for an object in order to use '()' on it, then you can't access functions using the dot notation (at least not without substantial effort).
As I work with objects, especially graphics objects, I find that more and more often I wish there were some easy way to sort the lines of an output, or to grep the output.
For example,
[~, h] = contourf(rand(20,30));
struct(h)
now try to find the Alpha information.
If there were (unix command line style)
struct(h) | sort
or
struct(h) | grep -i alpha
then this would be easier.
This syntax itself of course would not work as | and || are already used in MATLAB. I recall seeing at least one programming language in which pipe was indicated by # which is a currently unused operator
struct(h) # sort
In at least some cases it would be possible to write a user function, something like
function sortlines(values)
if iscell(values) && all( cellfun(@ischar, values) )
as_cellstr = values;
elseif ~ischar(values)
as_cellstr = regexp( Capture(values), '\r?\n', 'split');
else
as_cellstr = cellstr(values);
end
[~, sortidx] = sort( strtrim(as_cellstr) );
fprintf('%s\n', as_cellstr{sortidx});
end
function S = Capture(values) %#ok<INUSD>
%magic reference to parameter name because evalc needs a string
S = evalc('disp(values)');
end
and then sortlines(struct(h)) works usefully.
Generic search of cell arrays for values where cell contains mixture of character and numeric data.
Example
>> whos facilities
Name Size Bytes Class Attributes
facilities 10295x97 68335626 cell
>> facilities(1:10,[1 4])
ans =
'U.S. Department of Energy, The Energy I...' ' '
'EIA-923 Monthly Generation and Fuel Con...' ' '
'Sources: EIA-923 and EIA-860 Reports' ' '
' ' ' '
' ' ' '
'Plant Id' 'Plant Name'
[ 2] 'Bankhead Dam'
[ 3] 'Barry'
[ 3] 'Barry'
[ 3] 'Barry'
>>
It'd be much more convenient to be able to just search for a given plant ID number (numeric) or name (alphanumeric) but no can do that I'm aware of w/o separating out the disparate types and doing so then loses the absolute reference as results are returned relative to the position in the subset, not the actual array itself.
This particular example is complicated owing to EIA having changed format and header row and columns aren't consistent for all years of downloads hence the file has to be parsed from the raw data to automagically return specific data across multiple years plus number of reporting units varies from year to year.
It's also confounded by the fact that returning the numeric and text data arrays is also not self-consistent--for the same file the result of doing that is
>> whos dat txt raw
Name Size Bytes Class Attributes
dat 10461x97 8117736 double
raw 14000x97 92673516 cell
txt 10467x97 62650656 cell
>>
I'm not sure at this point where the disparity of 6 between dat and txt arises but it's very worrisome that wouldn't be certain were actually getting the right data from one searching on the other for the location.
NB: The difference between the 1400 above vis a vis the earlier 10295 is owing to having manually truncated dummy entries introduced at the end of the database by EIA while futzing around trying to find a good search algorithm that worked across the full range of available files.
The ability to
- Define the main class and inner classes in one single m-file.
- Ternary operator.
- Matrix-unpacking such that:
[A,B,C,D] = unpack(Matrix);
Assigns the first column of Matrix to A, the second column to B, the third column to C and the remaining columns to D. In the case where Matrix has fewer columns than the number of the required output variables; those variables whose indices are larger than the last column index of the Matrix will be assigned an empty matrix.
The ability to detect the end of file condition (and stop output) when using the 'from-file' block in Simulink. This would allow the user to sequentially use input data files (especially useful for calibration data).
IA's recent comment on axes and a small farm task to solve for boundaries of a field location to locate a line such that the subsequent area along a non-straight waterway boundary contained a fixed number of acres reminded me of
Predefined hatching patterns patterns for surfaces and syntax to set them and their properties. While there are some FEx submissions, all I've tried have various warts and/or bugs and are version-dependent.
We were able to do this with CalComp graphics in the early to mid-60s on mainframes and the HP plotters and TMW can't do it in Matlab after 20 yr??? Wassup w/ that!!!???
The "axis" command/function should allow the ability to put tick labels on all tick marks. For example if you do "axis on" it will put tick marks on all 4 sides of a 2-D axis box, however the tick labels are only on the left and bottom sides. I'd like to be able to specify that tick labels (the numbers) appear on any of the sides, for example, all four sides.
Is this thread still relevant? I hope so.
I'm looking for the option to use a chosen 'colormap' for 1D plot. In other words - change 'ColorOrder' in to a given set of colors, without the need to choose and define the specific colors myself. MATLAB has such lovely colormaps, but I didn't find how to use them when plotting few line plots (either using 'plot' or 'semilogy' on the same figure).
Ideally - I would like to choose a colormap, and to choose the amount of colors I wish to have in my 'ColorOrder' list, and let MATLAB create the requested list. I think it shouldn't be complicated.
I'm attaching an image I've just created using several 'semilogy'. I think it help explaining my need.
I was going through your help, and looking for the answer online. Did I miss something? Regards.
Two things for tables:
- Item one: A function that tests whether a string names a variable in a table: isVariable( mytable, 'height')
- Item two: A plotting routine that handles tables. For example, a function that takes a table and then a "formula" (as with fitlm). For example:
plot(mytable, 'weight ~ height') % would plot one variable vs. another
plot(mytable, 'weight + height ~ age') % would plot two variables vs. a third on one axes.
What's missing a CMYK Europe color profile for EPS files. While working on a textbook I really missed this, as all the colors where in the US color profile and I had to convert them with a different software before editing the postscript files from MATLAB.
The list datatype... Cmoon FFS this is in the 30 y old languages as standard.... Ex python:
x=[1,2,3,4]
x.append('s')
x
Out[4]: [1, 2, 3, 4, 's']
x.insert(0,'first')
x
Out[6]: ['first', 1, 2, 3, 4, 's']
A quick reply mechanism in matlab answer forum.
Single precision sparse matrices would be nice.
I'd like a good way to stop computation when I realize I've accidentally given Matlab an impossibly large problem. Ctrl+C only works when it wants to, and Force Quit is a pretty lousy solution.
To simplify the syntax by at first also allowing " as a string delimiter:
qwe = "This would be a good idea"
The double duty and hard labour of ' is an awkward and uggly feature in matlab. This apparently works in Octave, Mathworks haven't been too shy about introducing new and remove old syntaxes (e.g. the scattered data sampling.) and they should easily make a tool helping with modification of old code. This would help a lot in cases where strings has to be constructed with transpose operations in for example callbacks.
I would like to see a more helpful editor, an editor which can (activated as a preference option) tell me if any of my own variable names or function names or m-file names, etc., is already in use by some other original THE MATHWORKS stuff. Let´s say, I am using the variable "i" in my script. But I am not aware, that "i" and "j" are already in use by MATLAB for somehting regarding complex numbers. Or let´s say, I am using a function which I name "move". But I am not aware that a function with such name already exists in MATLAB and I therfore without knowing might produce problems which I do not foresee. Let´s say, I am today using a certain function name, but tomorrow I will purchase a toolbox which is already occupying this name...
It is just not a good solution that I have to check each of my names in use with the "which" command first, in order to avoid such conflicts. The editor should be able to do this for me in the background automatically, especially that the editor could know about names in original The Mathworks toolboxes, which I by now have not installed and could not even consider in my "which" tests by now!
Huh, PSCAD turns out to be made by an organization on the first north-south road over from here. :-)
Yes, 6 terminal induction machines are possible in other software. PSCAD has a 6 terminal induction machine model, although I don't think it's part of their standard library.
enforce reporting tools, integrate latex programming.
The Find Files Tools does not honor multi-line comments. I wish it did.
I use multi-line comments to comment out "old" code that I want to keep temporarily. (I know, I should learn and trust a version control tool.) Multi-line comment is much better than single line comments because chunks of commented out code may be folded.
Example:
%{
cnx(jj).MaxSimulationElapseTime = test_request.MaxSimulationElapseTime;
und so weiter
%}
and when folded
%{...%}
In the search result for "MaxSimulationElapseTime" I cannot see that this line is commented out.
Since I believe this would be easily fixed, I find it very frustrating.
From R2012b onwards - Menus are missing! :)
Fortran-like FORMAT statement for (primarily) input parsing...
Amongst other things, allows for fixed-width fields directly w/o character parsing, and improves format string construction by allowing repeat specifiers (no more silly butt-ugly repmat('%f',23,1) constructs, hooray!)
Re-institution of textread as fully-supported including enhancements to input options equivalent to those in textscan to all direct import of arrays instead of only cell.
Here's one I've been wishing I could do recently:
my_data(start_index::length_variable)
instead of:
my_data(start_index:start_index + length_variable - 1)
Where 'length_variable' indicates how many samples I would like from the variable being indexed.
This is obviously not as important as some other suggestions and the method of implementing it could be different, but I really dislike the typical notation that is required for accomplishing this (two references to the start variable and a subtraction, and a much less visually pleasing format).
R-style named arguments with default value handling:
function Q = interp1(x=(1:length(y)),y,method='linear')
This would provide a nice, clean and consistent handling of input parameter parsing, for those who require fancier functionality that requires varagin that could still be used.
There is no option in simulink to simulate internal fault in Synchonous generator.. Also there is no option to measure phase currents on neutral side of generator, which is very useful in fault analysis of generator
Create a formal website for Matlab suggestions.
This isn't necessarily for Matlab as much as it is TMW in general, but what's really missing is a more appropriate setup for this type of question. I would really like to see TMW take on National Instruments model of the NI Idea exchange.
I realize this question, and similar questions like it, are perhaps meant to be banter or office discussion topics or whatever, but I think in some small way some people may hope that these answers influence company policy. As Doug points out (Answer by Doug Hull on 14 Feb 2011), the only official way to try and do this is through the enhancement request. Having submitted many enhancement requests myself, I find this route very unsatisfying.
I would prefer these requests to be public with their own rating system, similar to the NI idea exchange. I think this is a much more satisfying approach for users to provide feedback and provides TMW with the ability to see how other users feel about the suggestion. It might also be more obvious to users and encourage more participation if something formal like the idea exchange existed, instead of hiding enhancement requests behind support or in answers to random questions in the Answers section of the website.
Here's a link to the idea exchange I find the most relevant (NI Labview) but a google search may provide a more persistent link ...
What is missing in MATLAB?
Here is my quick thought for today (and most days when editing large sequences of code) :
In the native editor, it is nice when clicking on the if, try, for, etc... beinning construct or the end statement and it reference the line that may be far off the screen for it paired construct beginning/end but why hasn't anyone implemented the begging construct highlight to also include any of the else/catch in between constructs?
It would be nice when reviewing someone else's code to simply click on the beginning logic construct and see all sub blocks (if any) along with the location of the end construct statement.
one thing i'm finding particularly frustrating now is matlab inability to accept imaginary numbers in polar form directly. there is always the need to go through cart2pol and pol2cart everytime.I mean if its possible to enter 3+4j directly to the matlab prompt and do calculations with it, why isn't this possible with 5∠120° ??
Don't know if it has been said yet, but sparse matrix compatibility with GPU.
Easily defined enumerated types. You can write them manually, but it would be nice if MATLAB took care of all the work for you like modern versions of Java do.
Matlab and java usually work well together, as long as you respect the correspondance table between data types.
One data type is missing from that list : complex numbers !
I (almost) allways work with complex, and I have to make special interfaces in order to get java classes to work with Matlab inputs...
Efficiently model multi-body contact with simmechanics, currently you have to go through extensive machinations of calculating reaction forces explicitly and reflecting them back. That whole process is prone to errors. Also, flexible body dynamics would be nice as well.
Currently we use LMS Virtual.lab, that's one of 2 software packages we've found that allow flexible body dynamics co-simulated with Matlab feedback control, but the interface is awkward to "encourage" us to switch to their feedback software plug-in that doesn't have an embedded hardware link like Simulink coder.
Sooner or later Mathworks will come in direct competition with companies that used to be partners as everyone tries to expand their market and profits with a larger and larger vertical monopoly on a company's simulation workflow. That happened with National Instruments, MatrixX and PTC, Mathcad and will continue.
Matlab needs either a real 3d modeling interface and upgrade Simmechanics to handle contact or to get thoroughly embedded into every major CAD package, they ALL have dynamic simulation now.
For related comments courtesy of Fritz Lang (/Jamie Alexandre) see "Scientists of the World Unite"
I wish that when I use cell execution (CTRL-Enter from within a cell), the cell's commands would appear in the History and could be accessed by the up arrow or command completion (type first few characters of command then up arrow). If I am tinkering with commands on the command line, I have to copy/paste the commands in order to access them again later.
Assignment inside anonymous functions; for example, I'd like to be able to do something like:
cellfun(@(x,y) out.(x) = y, in(:,1), in(:,2))
to map a cell array, whose first column is a list of valid variable names and whose second column is a list of values for the respective fields, to an "equivalent" structure. (This "vectorization" would be consistent w/ the MATLAB philosophy/advice of avoiding for loops as much as possible.)
Sparse direct linear solver specific for complex symmetric (not-hermitian!) matrices
Missing : The assignment is not yet a functional operator :
a = (b = exp1) + (c = exp2); % could give to a the value (exp1+exp2).
Notice that Mlint should accordingly recognize the popular error :
a = (b = exp1) + (c == exp2); % give a different result.
Missing: a method to signal a running routine.
One can set a shared variable that the running routine would have to know to check, but that takes more setup and is often not well-understood.
Possibly a new mechanism could be created for the purpose of signalling, but I think that a pretty good job could be done using try/catch and error(). The main thing missing at the moment is that if one is in a callback (timer, graphics) then the suspended routine is not considered to be in the calling chain so there is no way to (for example) set up a timer that can error() a Timeout event to the suspended routine .
The semantics could get messier for parallel processing. Sometimes a timeout from one thread should just mean go on to the next thread, and sometimes a timeout from a thread should mean to shut down the entire parallel series as soon as practical.
There have been times when I have thought that it would be useful to be able to queue an event against a particular routine or particular component.
Sanity
I wish there were better functions for comparing performance across platforms and versions. Something like a stable bench on steriods.
A function to check if a string clashes with an official MATLAB function. Something like Jan's UniqueFuncNames, but with support for all MATLAB toolboxes. Preferably something that can handle different MATLAB versions and input classes. In other words randi exists in 2012a, but was it a function in r2008a or is there an fft function for class int16. The "which" function is helpful for your current version, but only for toolboxes you own.
An extension of bsxfun to more than two args. Example of desired operation (I've given it a new name, nsxfun, to avoid riskily modifying the ensconced function bsxfun):
function rslt = prod3(a,b,c);rslt=a.*b.*c;end % in editor
nsxfun(@prod3,[1 2 3],[4;5],[6;7]) % should return the same thing as
prod3(repmat([1 2 3],2,1), repmat([4;5],1,3), repmat([6;7],1,3))
I wish matlab could auto insert the white spaces into the expressions. For example, if I write a+b in an m-file or script, matlab would be able to make it a + b that will save a lot of effort entering white spaces before and after every operator which I am not accustomed to. I am not sure if this functionality is there in other similar software.
While now, I want to do 3D modeling task using matlab. And most in my need is a function that can translate mesh-surface in 3D-plot to binary volumetric image. ^_^
A true polar plot. I've been using an old copy of mmpolar (thanks Duane) for years. It seems ridiculous that the built in functionality has hard coded axis labels,etc. It's even brutal trying to adjust things that can be accessed, since the underlying coordinates are all Cartesian.
Add graphical interface that allows the user to add stochasticity to input parameters of differential equations in Simulink and MC and MCMC sampling of outputs, like Palisade at-Risk.
An equivalent of the UNIX command wc that allows one to determine useful information about the size of a file before reading it.
But can you do that in other similar software, Nitin?
Allowing square brackets for vectors and matrices, with zero base indexing, would be useful. This is:
vec[k] == vec(1+k) , with k ranging from 0 to length( vec ) - 1
Reasons: digital logic indexing naturally starts from zero. Also, porting from/to C would be easier.
Yes there one thing. I am not able to find out the induction machine model with stator isolated windings available with all the six stator winding terminals access.
Currently, "i" and "j" can be used as numeric suffixes to denote the imaginary unit.
This parsing could be extended to include pi, such as allowing someone to write
for k = 0:0.01:2pi
Of course, as 2pi is itself numeric, it should be suffixable with "i" or "j", leading to (e.g.)
exp(-2pii)
Built in 64 Bit Compiler to allow out of the box integration with Adobe Photoshop using 64Bit versions of the software.
Please correct me if I'm wrong, but I find the way methods are supposed to be declared and used incosistent. I.e., When you call a method, you are allowed to use both method(obj, variable) and the obj.method(variable) syntax. However, when you declare it, you can only use method(obj, variable).
"something you can do with other similar software but can't with MATLAB"
In a separate pane in the Editor window, see an expandable list of "structures" (in a generalized sense, i.e., including functions, structs, classes, imported modules, etc.) present in the currently visible tab. (I'm not as familiar w/ other IDE's as I'd like to be, but I know that Stani's Python Editor has a feature like this, IIRC, so does MS Visual Studio, and I think Eclipse does also.)
Support for arrays of formats in datetick, e.g., I'd like datetick to be able to produce time axes like:
| | | | | | |
09/12 00:00 06:00 12:00 18:00 09/13 00:00 06:00 12:00
by passing in something like {'mm/dd HH:MM', 'HH:MM'} for the dateform argument. (In contemplating writing this myself, I realize it is non-trivial to make such a thing robust to the variety of arrays users might try to throw at it. On the other hand, there is nothing to stop MATLAB developers from deciding on a syntax/outcome they will support and then define that in the help string: IMO, something along these lines would be better than the monochromatic status quo.)
fseek() cannot move past the last byte in a file, contrary to POSIX.1 .
fseek() past end of file is not an error in POSIX.
Requesting a read operation at that point is not an error but does result in the end-of-file flag being set.
Requesting a write operation at a point after end of file is conceptually equivalent to zero fill between the previous end of file and the position of the new data, except that OS's and file systems are allowed to use "gaps" with no backing disk space in the file meta-information; these are traditionally referred to as "holey files", and can be very important for the efficient implimentation of databases.
Any fseek() clears the error flag and the end of file flag from the stream, even if the system can detect that the new position would be after the end of the data actually written.
If there was any data waiting to be written out in the stream, such as if C's fwrite() or fgetc() buffered I/O had buffered data, then the data must be flushed before fseek() returns (unless perhaps asynch I/O was being used; I would need to check that.)
fseek() also handles whatever internal house-keeping is necessary so that on read/write streams, after the fseek() [no matter where to], the stream is in a state where reading or writing could be the next operation.
Reference: POSIX.1-1990 6.5.3 .
This problem was hit "in the wild" when someone fseek()'d to a few bytes in to a new file (skipping a binary header whose contents were to be determined later) and wrote data, and then was confused when fopen() + fseek() + fread() read in bogus data: the initial fseek() past end of file had silently failed so the data was being written from the beginning of the file rather than after the expected gap.
Workaround: None possible except to keep internal track of where one is supposed to be, and if/when an fwrite past end of file is done, go back to the current end of file and fwrite zeros to the current position and then allow the fwrite to proceed. If there are opaque subroutines that might move the file position, this method will not work -- at least not without overloading the I/O operations.
I am new with MATLAB so maybe I can do the following and still haven't figured out how
Can one use use
dsolve ('Dz=a*z+b*t+c(z,t)','t')
where c(z,t) is a user-defined function?
The specific form of the expression is only an example (in principle it could/should be more general). The important think here is the use of a user-defined function within the expression that gives the differential equation.
Use of wild cards and regular expressions with GET and SET.
get(gca,'camera*') % Should return 8 properties
If there is an atan2() function, why isn't there an acot2() function or acos2() or asin2() ?? Equal time for arc functions!
Controlled time limitations.
You could start timers, and the timers could throw error(), but the timers are not parented to a code block so you cannot try/catch to control timeouts.
These time limitations I'm referring to are "non-cooperative", in the sense that the code being invoked should not have to have been written to know the time-out protocol you are using and should not have to check particular state variables or what-not.
Ideally even BLAS-level operations could be interrupted.
For example, I might want to code the equivalent of, "Give eigs() 5 minutes to come up with the solution, but if it hasn't converted by then, stop that approach and hand off to eig()"
Or I might have a function whose workings I am not familiar with. Or perhaps I'm running a unit-test framework or a framework to test class assignments.
Are the MATLAB Contest time limitations not programmable in MATLAB ?
1. Distinguishing variable from function names in M-Lint. To get around the current limitation, "declare" which names are variables and which are functions, e.g. with %#fdef and %#vdef statements somewhere after the help header. These could be generated automatically e.g. via a dialogue box that asks the user to tick the boxes as to which ambiguous names are which. It would be useful for detecting uninitialized variables and other common typos.
2. Allow pausing/monitoring/debugging calculations mid-flow, e.g. with a pause button, or breakpoints that can be added during program execution, or a variable monitor window that displays variable values in a given workspace while the function/script is running. Would be very useful for monitoring long calculations without killing them.
3. multiple-line anonymous functions, or allow function declarations in scripts.
4. function calls with named arguments and default values in the function definition, e.g. "function f(x=[],n=length(x))" and "f(n=1)".
perl-like "interpolation" in strings.
For example, andrei coded
result = evalin(symengine,['simplify(' , char(expr),',exp)']);
This would have been much easier to write if it could have been done as
result = evalin(symengine,'simplify(${char(expr)},exp)');
or maybe
result = evalin(symengine,'simplify(${expr},exp)');
or with sufficient context matching,
result = evalin(symengine, 'simplify($expr,exp)');
(expr was a symbolic expression in the context.)
Interpolation is supported to a very limited extent, in regexp() and regexprep(). It is an important perl operation and it can make string construction a lot easier.
What is missing from MATLAB?
MATLAB Suggest feature like for Google to avoid error like undefined function ...
As you type in the search box on Google Web Search , Google Suggest offers searches that are similar to the one you're typing. Imagine you would have the same feature in MATLAB, if you type for example helpa instead of help , you get the following error message:
>> helpa rand
??? Undefined function or method 'helpa' for input arguments of type 'char'.
MATLAB Suggest feature will suggest to type help rand instead !
Make the "pretty()" command output even prettier! ;-)
Axes properties should be kept independent and the level of customization should be similar to excel.
- For instance, when manipualting TickDir or TickLenght it should be possible to differentiate among the effect on the X axes and Y axes.
- Or, when setting Xcolor, it shouldn't propagate to labels or grids!
- It should be possible to add additional X,Y axes w/o creating additional axes objects.
In general I want to have a more specific control over axes properties.
Multiple inspector instances in one instance of MATLAB: I want to be able to "inspect" more than one object at a time (e.g., to be able to compare property values); presently, I have to launch a new instance of MATLAB for each distinct inspector instance I want to use simultaneously--a tremendous waste of resources! (Don't worry, I'm submitting a formal enhancement request.)
Extend the : operator so that if there is a value on the left side but not the right side, that the implied right limit is 'end', and if there is a value on the right side but not the left side, then the implied left limit is 1.
A(5:) -- to be equivalent to A(5:end)
A(:4) -- to be equivalent to A(1:4)
The ungroup action for a compound graphics object like lineseries.
Inspired by Carl's csvread requests:
A textscan format specifier indicating that a date was expected at that position, possibly including embedded blanks. A modifier would allow specification of one of the standard date format numbers. Output would be a serial date number.
Extra points for a format specifier that allowed the standard date elements, such as
%t{mmm yy, HH:MM}
What is missing in MATLAB?
Here are my two quick thoughts for today :
1) More choice in default uicontrols:
Currently , user interface controls include push buttons, toggle buttons, sliders, radio buttons, edit text controls, static text controls, pop-up menus, check boxes, and list boxes.
I would like to have more custom pushbuttons . I would like to be able to modify the borderwidth (like for uipanel) , to choose another form than rectangle or square like circle , triangle ... I really feel frustrated not to be able to build a GUI with such components . Currently the only thing I do to enhance the design of my softwares is to use CData to add icons ! I always try to find the best backgroundcolor for my GUI ...changing colors is possible but not the form/appearance of the uicontrols.
Except uitable which is quite new, I didn't find any major improvement to build GUI since many years.
2) Documentation in another language
What about a French doc ?!! Translating the doc in Japanese was possible , so doing the same thing in French should be also possible .
Aurélien
Better integration with perl.
Currently it is necessary to write the perl script to a file and invoke perl() on the file name. Arguments after the file name are permitted but not options before the file name. This makes it impossible to use any of the perl command line options, especially the -e option to designate a short in-line script.
For example,
perl -pe 's/^/ /' foo.txt > newfoo.txt
should ideally be accepted just like on shell scripts lines, but people could probably get used to
outstring = perl('-pe', 's/^/ /', 'foo.txt'); if ischar(outstring) fid = fopen('newfoo.txt','w'); fwrite(fid, outstring); fclose(fid); end
Manual redirection is a nuisance, but having to write trivial scripts to a file in full form (without the benefit of -n or -p even) keeps perl from being used to its full benefit.
Associative tables, such as indexing by string or arbitrary object.
Indexing by string is relatively easy to fit in to current syntax, unless the string happens to be ':' .
Indexing by more complicated objects would require a new index syntax, I suspect.
To a point, indexing by string can be simulated by structures and dynamic field names, where the first character of the field name was fixed (to avoid problems with strings that do not start with alphabetics), and where characters outside the regular range of field characters were percent-encoded with the % itself replaced by underscore, using UTF-8 representation
foo('Hi there‡') -> foo.SHi_20there_E2_80_A1
Likewise, indexing by an arbitrary (non-integer) double can use hex:
foo(pi) -> foo.D400921fb54442d18
There is a natural extension to single (float), and the extension to uintN and intN need not be hard:
foo(uint16(34163)) -> foo.U28573 where the digit after the U ('Unsigned') indicates the number of bytes. 'I' for 'signed'.
If a mechanism was added to delimit strings (e.g., '__' which is not a valid numeric encoding) then one could imagine chaining several together
foo('Hi', pi) -> foo.Shi__D400921fb54442d18
These mappings fail, though, when the encoding gets past the maximum field length, 63 characters.
More efficient compilation of MATLAB code to avoid memory churn (hence slower computation) of large arrays.
Examples:
B = exp(-(abs(sin(A)) .^ 2)) / (2 * pi);
could be compiled as a one complicated operation computed on each element of A in turn. More cleverly, for
M = any(sum(abs(A), 2) < 1);
compute the sum(abs(A), 2) one row at a time, do the comparison one element at a time, and exit when the first true element is found. I could go on.
Such improvements to the JIT compiler would be fairly simple, I reckon.
Pipes / popen() / ability to communicate interactively with other programs without having to use tcp/udp .
Explicit fflush()
yeah, I know fseek() to 0 bytes relative to the current position does the same thing in POSIX, but Windows doesn't promise POSIX.
More flexibility to work with I/O streams rather than having to have everything in memory.
As a simple example: unzip a single file starting from the current position in an I/O stream, rather than having to unzip to disk and read the resulting file.
Exposed documented serialization routines. Currently, to transmit Matlab variables to a different process, about the best method available is to save() to file, send the binary file, read the binary and write it to disk, and load() the variables.
Better methods must exist already for use with parallel processing, so it would help to expose and document them.
ability to enter default inputs like in python as in function out=foo(bar,bar1='arr',bar2='yarr') ...