# What is missing from MATLAB?

192 views (last 30 days)
Paulo Silva on 14 Feb 2011
Answered: slevin Lee on 31 Oct 2022
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?
Stephen23 on 9 Jan 2018
Edited: Stephen23 on 9 Jan 2018
"... 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).

Walter Roberson on 14 Feb 2011
The result of every expression should be further indexable by all of the index methods. This includes not only function calls but literals or expressions: e.g.,
(1:3:20)(K:K+1)
or
[struct('hello',A+5),B].hello
Rik on 27 Oct 2019
Edited: Rik on 27 Oct 2019
@Adam, I think we are almost there. The example given makes me shudder with the though of how novice users will misuse this to strive for more compact code instead of better readable code.
Your example makes sense, but that tends to be true for most constructs. Currently (R2019b) you can do this:
n=3;
if ~verLessThan('matlab','9.7')
table([1,2,4,7,11,14,16,17]).Var1(n)
end
Edit:
I just tested this on R2015a, and it already works, despite the release notes suggesting otherwise. That very same release notes search suggest this isn't actually something new, but is actually something that was ostensibly removed in R2010a.
%both of these work in R2015a (and presumably most releases):
n=3;table([1,2,4,7,11,14,16,17]).Var1(n)
n=3;struct('Var1',[1,2,4,7,11,14,16,17]).Var1(n)
%the struct line does error on R13 (v6.5)

Jan on 14 Feb 2011
A long term supported version!
The current policy to fix bugs mainly by shipping a new release has the important drawback, that a new relase includes new bugs ever. If reliability is extremely important, e.g. for the prediction of the outcome of surgical operations for children, MATLAB is a fairly good choice, as long as a program runs only on the release it was developped on. I must be able to reproduce the results of a published medical study for 10 years. If such a study needs 5 years to measure the long term effects of a medical treatment, it is really unclear, if I can run MATLAB 2010b in the year 2025. Therefore MATLAB is actually not suitable for a long term study -- but there is a good argument to use it in spite of these facts: The alternatives are even worse.
dpb on 25 Feb 2019
Edited: dpb on 25 Feb 2019
Hadn't seen this previously until last activity link was adjacent...but it's still most apropos to real world.
Can't agree with Jan/Robert more -- in nuclear power generation field we were expected to keep similar abilities to reproduce safety-related calculations for "the life of the plant" which began as the 40-yr lifetime when applications were filed. Many of these plants are now well past that and have foreseeable futures extending another 20 years or more.
Hence, we were never able to use MATLAB for such because it wasn't stable.
Of course, it's impossible to now rerun old LIFE cross-section calculations on the Philco-3000 I ran in 1968, but at least we did have a traceable migration path.
Until building inspector/fire marshall put end to it for possibly exceeding design floor loadings and the fire-safety issue, the entire outside halways of the office building were lined from one end to the other with metal shelves stacked full of "greenbar" folders of computer output. One overnight run would generate roughly 12-18" stack of printout, almost a hundred of us each doing that virtually every night added up to a lot of paper! Eventually they rented the old PigglyWiggly store and turned it into the repository for filing/retrieval identification before shipping them to the salt mines in Hutchinson, KS, for long term storage.

Matt Fig on 14 Feb 2011
Real pass by reference.
owr on 21 Jul 2011
Edited: Walter Roberson on 8 Jan 2020
Malcolm, databucket is nice but an issue is that subsref in objects is much slower than in native arrays. Try this:
% Start Code
N = 100000;
d1 = randn(N,1);
d2 = randn(N,1);
db1 = databucket(d1);
db2 = databucket(d2);
dres = zeros(N,1);
dbres = zeros(N,1);
tic;
for i=1:N
dres(i) = d1(i).*d2(i);
end
nativetime = toc
tic;
for i=1:N
dbres(i) = db1(i).*db2(i);
end
objecttime = toc
% End code
In terms of the original question though, Ive managed fine without explicit pass by reference. But I can understand why one would want it.

Doug Hull on 14 Feb 2011
The most effective way to put in an enhancement request for MATLAB is shown here.
It is fine to discuss things, but this forum is not guaranteed to be seen by the right people. The above link is.
Julian on 21 Apr 2011
Doug, may I ask how does one view/navigate/search the enhancement requests submitted this way? Mathworks.com search allows you to search Bug Reports (for example), but I could not see "enhancement requests". Thanks.

Aurelien Queffurust on 18 Feb 2011
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
Steven Lord on 11 Mar 2021
1) The capability to create custom UI component classes was added in release R2020b and the ability to use them in App Designer was added in release R2021a. See the Release Notes for more information.
2) A subset of the documentation is available in French on the web in release R2021a.
Re: performance of App Designer: The Performance section of the release R2021a Release Notes lists several improvements related to graphics, UIs, and the Live Editor.

Jan on 14 Feb 2011
It would be very helpful, if the Mex-interface is completely documented. Especially the inplace write access to variables passed by reference is a holy secret - although it is possible already and would be much more efficient.
##### 2 CommentsShowHide 1 older comment
Walter Roberson on 30 Jun 2016
(This has not been implemented yet, as of R2016a)

Walter Roberson on 14 Feb 2011
Graphic support for arbitrary unicode characters.
Walter Roberson on 27 Jul 2017
I have been able to use unicode characters with TeX, but not with LaTeX.

Walter Roberson on 16 Feb 2011
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.
Walter Roberson on 30 Jun 2016
(This has not been implemented yet, as of R2016a)

Oleg Komarov on 17 Feb 2011
Anti-aliasing... MYAA
##### 2 CommentsShowHide 1 older comment
Walter Roberson on 30 Jun 2016
(Anti-Aliasing was improved from R2014b or a release soon after that. I gather it still has some oddities as of R2016a.)

Walter Roberson on 14 Feb 2011
Programmatic layout routines. I had to create my own, one pass to shrink-wrap a control to the size it needs to hold the value(s), and the second pass to position the control relative to another control.
Exporting from GUIDE produces completely unmaintainable coordinates. It is not an option for producing maintainable software.
Adam Danz on 20 May 2021
Edited: Adam Danz on 20 May 2021

Ben Petschel on 8 Jun 2011
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)".
Steven Lord on 12 Sep 2019
Release R2019b allows you to declare specific restrictions (and default values) for input arguments. See more in the Release Notes and the documentation page to which that note links.

Walter Roberson on 14 Feb 2011
An equivalent to the ?: operator, in which the unselected part does not get evaluated.
Walter Roberson on 30 Jun 2016
(This has not been implemented yet, as of R2016a)

Walter Roberson on 14 Feb 2011
A way to return multiple outputs from a function in an expression context, without having to resort to using a separate assignment statement.
Even if at the beginning this only allowed selecting one output to return by discarding the leading N outputs, that would help .
This is functionality that cannot be written at the user level.
##### 2 CommentsShowHide 1 older comment
dpb on 16 Mar 2017
Does not Octave have at least some of this capability I think I recall seeing? I agree (and added my vote for the Answer previously); just ran into another case on a forum query the other day where temporary created for no other reason clutters up the workspace...

Peter O'Connor on 15 Feb 2011
ability to enter default inputs like in python as in function out=foo(bar,bar1='arr',bar2='yarr') ...
Rik on 13 Sep 2019
They're not fully done implementing it anyway; the MinGW compiler installer isn't working yet. I hope they will post something there when it is, because I will probably forget to install it untill I'm getting weird errors...

Daniel Shub on 5 Apr 2012
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.
Steven Lord on 1 Jul 2016
In release R2014b we added capability where MATLAB suggests which MathWorks product is required for an undefined function, which is a step towards what was requested. See the item "Suggested MathWorks products for undefined functions" in the Language and Programming section of the Release Notes for MATLAB for release R2014b for more information.

Will on 10 Jan 2019
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.
I guess Rik's comment is offtopic, I agree with Will.
Automatically highlighting a selected field of a struct (or property of an object) would be very helpfull. I'm using VS Code, which is a bit better because it highlights other words similar to the selected field.

Walter Roberson on 14 Feb 2011
A notation to be able to represent multi-dimensional data, instead of having to cat(N,...) the dimensions together.
This notation should in turn be understood by (e.g.) load routines
Walter Roberson on 30 Jun 2016
(This has not been implemented yet, as of R2016a)

Walter Roberson on 16 Feb 2011
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.
Steven Lord on 10 Mar 2022
This doesn't sound exactly like what you requested, but could a datastore array (introduced in release R2014b) satisfy some of your requirements for such an I/O stream, possibly if used to create a tall array?

Walter Roberson on 15 Feb 2011
Short-circuiting vectorized conditional tests. This might require introducing a new keyword.
For example,
x > y/2
would normally compute the entire element-by-element vector x(K) > Y(K)/2, and then that vector would be processed within whatever expression was around it. For example,
find(x > y/2,1,'first')
or
if any(x > y/2)
But logically these don't need the entire vector result, just a single scalar result.
A lot of the time people are working with vectors too short for BLAS to kick in, but long enough that the time savings of short-circuiting would add up.
Imagine, for example, a new keyword "first":
find(first x > y/2)
or
if first x > y/2
"first" could return either 0 or [] if not found; [] would be more consistent, and ~[] is false so ~first would work like ~any(). On the other hand, what it should return so that it works with find() and logic conditions is a good question.
Walter Roberson on 30 Jun 2016
(This has not been implemented yet, as of R2016a)

Walter Roberson on 16 Feb 2011
Pipes / popen() / ability to communicate interactively with other programs without having to use tcp/udp .
Walter Roberson on 30 Jun 2016
(This has not been implemented yet, as of R2016a)

Walter Roberson on 18 Feb 2011
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}
Walter Roberson on 8 Jan 2020
readtable() and kin are getting increasingly better at deducing date format, including when there are are spaces.

David Goldsmith on 16 Mar 2011
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.)
Walter Roberson on 28 Aug 2013
R2013, if I type uisetcolor into the GUI search engine, it shows up without difficulty. But if you tried to search for it without knowing the right verb (e.g., if you were looking for "pick color") then good luck.

Walter Roberson on 13 Jun 2011
If there is an atan2() function, why isn't there an acot2() function or acos2() or asin2() ?? Equal time for arc functions!
Andrew Newell on 13 Jun 2011
We shall overco-o-ome! We shall overco-o-ome! We shall overcome some day-a-a-a-ay!

Dan K on 27 Jan 2012
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.
##### 2 CommentsShowHide 1 older comment
Steven Lord on 30 Jun 2016