MATLAB Answers

What frustrates you about MATLAB?

조회 수: 968(최근 30일)
Oliver Woodford
Oliver Woodford 16 Feb 2011
편집: David 8 Apr 2021 18:42
I love MATLAB. It is so quick and easy to write software to do what you want. It has excellent debugging and profiling tools. It is cross platform, making code easy to share (assuming the other people have forked out for the not-so-cheap license). It has interfaces to other software.
However, there are some things about it that irk me. I'd like to hear from other people what things annoy them about MATLAB.
---------------------------------
Because this thread has become so large it is slow to load and navigate. Please post new answers in the second thread.
---------------------------------
  댓글 수: 45
Steven Lord
Steven Lord 2 Apr 2021 18:38
What do you mean by "change the size of a plot window"?
  • Change the size of the figure window
  • Change the amount of space in the figure window occupied by the axes
  • Change the limits of the axes to show a larger part of a plot that's larger than fits in the current view of the axes
  • (As a bit of a stretch) Change the width of the line or the size of the markers used to plot the line. [If you hadn't used the word "window" this would be a more plausible interpretation of your request.]
The plotting capabilities of MATLAB do offer a lot of functionality and with that must come some level of complexity. I will admit Handle Graphics does have a bit of a learning curve.
The main way I would recommend interacting with Handle Graphics objects is:
  • Find the handle of the object with which you want to interact. This could involve calling plot or other graphics function with an output argument, using the findobj or findall functions, or using the ancestor function.
  • Search the documentation for the task you're trying to complete to see if there's a function. Use axis or xlim to change the X axis limits, for instance.
  • Use dot notation to change the object's properties if there is no convenience function. f = figure; f.Position = newCoordinates; as an example.
One problem with your suggestion of "clean up this mess of features related to plot" is that the plot function has been around for at least 20 years (probably closer to 30 at this point) and people have written a lot of code that take advantage of those "mess of features". When we introduced the new version of the graphics system in release R2014b we did fix some long-standing bugs, introduced new capabilities, and eliminated or simplified some of the helper functions. Even though we tried to be careful about it and give plenty of warning, some users were still annoyed/upset with us for breaking their code. Doing a wholesale "blow up the system and replace it with something new" would be painful for both MathWorks and for long time users.

댓글을 달려면 로그인하십시오.

답변(154개)

Oliver Woodford
Oliver Woodford 16 Feb 2011
MATLAB's figure rendering and exporting functions are so full of bugs and "features" it defies belief. The rendering is very slow and stalls computations - rendering should be in a separate thread and not delay computations (unless specified by the user). It is crazy that you can't have a seperate colormap per axes, either.
  댓글 수: 9
Tayyip Ensar Özkaya
Tayyip Ensar Özkaya 14 Jun 2020
The 3D control of pointclouds is just the hell!!

댓글을 달려면 로그인하십시오.


Ian
Ian 28 Mar 2011
  • GUIDE is a such an underpowered mess. Very poor set of widgets, endless bugs and terrible performance in the Guide editor (try moving sets of elements with the keyboard and weep!). TMW has dragged along hidden support of more UI widgets likes tabs, why can't they just update GUIDE and bring it.them into the modern age? Yair Altman does more in one blog post than TMW does in each year's paired releases to make GUIs better in Matlab!
  • UNICODE support -- why is TMW so far behind on this!?
  • Graphics quality -- graphics and text should be anti aliased by default and better composited, the pixel vomit is unacceptable on such an expensive product and one where its competitors are so ahead in this regard.
  • Poor OS X support. Failure to copy vector figures to clipboard is my biggest gripe.
  댓글 수: 8
Walter Roberson
Walter Roberson 28 Jun 2017
Note: Unicode support in plots was added in R2014b. However, there is no obvious way to add Unicode in Latex.
Note: anti-aliasing of lines and text was added in HG2.

댓글을 달려면 로그인하십시오.


Jan
Jan 16 Feb 2011
Using a C-compiler not included in the list of known compilers is horrible. "mex -setup" calls an M-file, which calls a PERL script, which creates a DOS batch file, which is interpreted by another PERL script, which calls the compiler through the command line interface.
Strange. A tiny M-file could create the same command line call to the compiler also. But it would be much easier to adjust it to a different compiler.
  댓글 수: 6
Praveen Kumar
Praveen Kumar 24 Jun 2019
I had two subsystems(A and B). I want B inports which are conncected to which outports in A. Any ideas.

댓글을 달려면 로그인하십시오.


David Young
David Young 28 Sep 2011
Overriding subsref and subsasgn in a class is spectacularly awkward.
The problem is this. Suppose you override subsref in order to change behaviour of obj(...). Then your subsref is also called for the syntax obj.propname. In order for it to handle this correctly (i.e. behave the same as the built-in subsref) it has to reimplement all the checks for access protections that are normally done by the system. For just how problematic this is, look at Daniel's answer to my question here.
Apart from this major difficulty, it's also inefficient for every subsref to have to switch on the indexing type ('.', '()', or '{}') on every call, and for the system to have to build a struct that includes the indexing type as well as the indexes.
As far as I can see, it would be so much better if the different indexing syntaxes called three different methods.
  댓글 수: 3
SK
SK 30 Apr 2014
Agree. subsref and subsassign are unusable and can be fairly called broken in principle. Also, once you have overloaded () for a class, you can no longer have consistent notation for arrays of that class type. The basic reason is the overuse of the () operator for array subscripting, instead of the more sane [].

댓글을 달려면 로그인하십시오.


Oliver Woodford
Oliver Woodford 16 Feb 2011
It's very expensive (unless you're a student), especially if you use lots of toolboxes. Fortunately my company pays :), but if I start my own company I'll think twice about (ok, before) buying MATLAB.
  댓글 수: 16
Chris van Halewyn
Chris van Halewyn 6 May 2020
Yep. Me too! I've got a Nexys4 board (£200 -not $33,000!) that I got because it is recommended for education/training and got Vivado (free) to program it. Vivado calls out for Matlab HDL tools on installation but they are not available under the home licence which would have been so cool...
Matlab, please sort out home licensing for HDL tools. It's time.

댓글을 달려면 로그인하십시오.


Robert Cumming
Robert Cumming 16 Feb 2011
plot legends are not always placed in the "best" position - quite often its right slap bang on top of the data...
  댓글 수: 2
Matt J
Matt J 13 Nov 2018
You can, but shouldn't the default legend position be somewhere not covering data?

댓글을 달려면 로그인하십시오.


Dan
Dan 2 May 2017
Functions and classes defined within a package should not have to import the package or refer to other members of the package with the package name ... the import should be automatic ...
Given the requirement to refer to the local package name within the class or function definitions ...
  • It is difficult to rename the package
  • It is difficult to place the package within another package
  • It clutters up the function and class code with import calls ...
Please fix...

Sean
Sean 27 Sep 2011
I would love to just write x++; instead of x = x + 1;
  댓글 수: 6
Adam
Adam 12 Apr 2019
Please don't use Matlab Answers for advertising links. I deleted the link you added here.

댓글을 달려면 로그인하십시오.


Oliver Woodford
Oliver Woodford 16 Feb 2011
MATLAB is lacking tools for saving movies in decent compressed video formats (e.g. MPEG4, H.264 etc.). Currently I find myself saving a huge list of PNG files, then converting these to a video in an external application, which is far from ideal.
  댓글 수: 2
Wyken Seagrave
Wyken Seagrave 14 May 2014
The secret of creating high quality videos on Windows is to use VideoWriter, an object compressed with Motion JPEG, and not movie2avi, which produces low quality video. So it is frustrating that, when you search the Help for "movie", and you find movie2avi, the only reference to VideoWriter is a single word at the bottom of the help page. I think there should be a warning that it has replaced movie2avi!

댓글을 달려면 로그인하십시오.


Patrick
Patrick 27 Oct 2011
The figure-export is a pain, if annotation are used they will move about, not all of them and not much and not to any order (at least nothing i could recognise) but sometimes a few mm in the odd direction.
  댓글 수: 1
K E
K E 25 Jul 2012
Also, quality of copied figures is poor (blurry lines/text) and requires workarounds like export_fig .

댓글을 달려면 로그인하십시오.


Richard Finley
Richard Finley 30 Jan 2012
I have been a licensed user of MATLAB for the past 20 years. I am also a big Mathematica user and sometimes use Maple and Mathcad and of course I love R and Python. I have enjoyed using MATLAB for my numerical work, but the licensing hassles have driven me to the point that I am considering just dropping it after all these years. I don't mind paying the (substantial) price for my license -- but then just let me do my work -- whether it is on my main desktop or my laptop. I used to just get the update CDs and my license number by email and no hassles. Are you really making more money by stopping piracy with all your licensing hassles? I doubt it. You are driving away your paying customers/user base. I sympathize with this (former) user: http://mybrainextension.blogspot.com/2011/07/aaaarrrrrrgh-matlab.html
  댓글 수: 4
Mace
Mace 7 Oct 2015
I agree. License hassles are the main reason why I'm switching to R. I constantly am interrupted by license issues. E.g. I drop wifi or just vpn and matlab does not execute commands without even notifying about it - it just does nothing while I think it's computing. Or I wake up my mac and before it connects to wifi matlab already shuts down saying it lost connection to the license server.

댓글을 달려면 로그인하십시오.


Csaba
Csaba 4 Dec 2013
My current frustration is with the Matlab editor: when the same M-script source is open in both the Matlab editor and another code editor (certain things are more efficient in the other editor), and the Matlab editor detects a change that was made to the file outside, it reloads (which is correct) - but it also forgets about all location information from before the reload, and jumps to the beginning of the file.
I would expect this is just an oversight (how hard would it be to remember the line at which the cursor was before reload - even if the code change that triggered the reload shifted content, most of the time this would be by only a few lines or pages, still much better than starting from the top of the file every_time_ ...).
And if that's not feasible, at least letting the bookmarks survive the reload would be a reasonable work-around, but sadly no, they are erased as part of the reload as well.
Am I the only one having trouble with this?
  댓글 수: 2
jaya viMALA
jaya viMALA 12 Apr 2019
yes, my Students also get the Same issues, I need some Guidence on this
Regards,

댓글을 달려면 로그인하십시오.


Ian
Ian 28 Mar 2011
Lack of OpenCL support: TMW forces us to depend firstly on a toolbox for this functionality, and secondly on the vendor lock-in using CUDA. Mathematica builds this in to its core, not some toolbox, and provides both CUDA and OpenCL support so we aren't forced to a single GPU vendor.
  댓글 수: 6
Walter Roberson
Walter Roberson 28 Jun 2017
I am told that OpenCL is more a framework allowing for the possibility of various actions being possible, but with considerable variability in what the different manufacturers support, and therefore Mathworks would effectively have to do different OpenCL implementations for each manufacturer and to specialize it for different models within the manufacturer.

댓글을 달려면 로그인하십시오.


tom 1line=1bug
tom 1line=1bug 12 Sep 2011
Frustrating factoids after living with Matlab since version 4.x:
1. Ambiguous use of parenthesis ([([( indexing operations and function calling )])]). I wish Matlab's syntactic sugar could differentiate between this two actions, using parenthesis and something else (i.e. like Mathematica's use of parenthesis vs square brackets)
2. Poor quality graphics (already mentioned in detail by other fellows)
3. Excessive "commoditization" or segmentation of functionality that should be part of the core Matlab product (e.g. signal processing, image processing, statistics, and pdes).
4. I wish there was better quality control when rolling out toolboxes. The seemingly lack of coding style/guidelines is particularly annoying. Even toolboxes meant to be used together have inconsistent syntax and seem a bunch of functions "bolted-on" to Matlab, rather than coherent extensions of M language.
5. I hopelessly wish there was first-rate support for functional programming.
6. Very poor support for time series and data structure requiring multiformat date/time indexing.
99nth. Non-specific gripe: Over time Matlab is becoming less and less my primary platform for scientific computing and algorithm development, and more often than not just a target for deployment (meaning re-writing whatever project in the M language) because the customer/client is using it, or because a particular toolbox is a time-saver. I remember the days of yore, when Matlab looked like a hammer and most problems looked like nails. Now I feel that the handle of the hammer is a Baroque wooden carving, richly ornamented, weighting 120 lbs... More surprising is the strange comfort of spending so much more time working with Mathematica's superhuman -indeed extraterrestrial- capabilities for algorithm development and testing, and the "translating" to Matlab upon request. I guess necessity is the mother of strange companions...
  댓글 수: 1
Oliver Woodford
Oliver Woodford 28 Sep 2011
Commoditization is an excellent point. It should be an answer by itself.

댓글을 달려면 로그인하십시오.


David Young
David Young 13 May 2015
The inputParser / validateattributes / validatestring collection of function parsing and checking tools.
  • You have to write too many lines of code to do even simple things.
  • I haven't done any testing, but I wonder about the overheads: all that object, anonymous function and cell array construction and access.
  • Despite the complexity and apparent power, there are silly limitations. For example, required arguments must precede optional arguments must precede name-value pair arguments. Given that there are validation functions, there's no need for this.
  • There was an absurd change of name of one of the methods of inputParser from addParamValue to addParameter . The documentated functionality appears to be the same, so there was no need for the change, but this is the biggest cause of users of old versions to run into trouble with my code on the FEX.
  • The functions don't work nicely together. For example validateattributes always throws an error for invalid inputs, rather than returning a result. That means that you can't combine two calls to it into a single expression for a validation function (e.g. my input could be empty, or a row vector of length 3). I can work round this with a wrapper function that catches the error; but integrated design would have avoided the need.
  • Another failure to integrate functionality: validatestring can handle abbreviated inputs nicely, but if you use it as a validation function for inputParser the information as to which possible input whas given is lost, and you have to call it again on the parsed results.
There's more to say, but I hope that makes the point. There's a strong case, I think, for starting again in this area, or failing that for offering a migration route to functions that do work together properly.
  댓글 수: 5
Andrew Janke
Andrew Janke 24 Jan 2021
I don't know about David, but I find your new function argument validation feature to be a big win, and am switching to using it a lot.
My only real complaint there is that the one-arg datetime(x) constructor treats numeric inputs as datevecs instead of datenums. Datenums are more common in all the Matlab code I've seen. So you can't do this and have it work right:
function fcn(dt)
arguments
dt datetime
end
[...]
end
And that there's no single value that you can pass in explicitly to a function to mean "I'm omitting this argument; just use the default", which happens a lot in my codebase because we have functions with like 8 positional parameters and you might want to only specify values for parms 1 and 7.

댓글을 달려면 로그인하십시오.


Knut
Knut 5 May 2011
The fact that once you schedule a low-level function, you cannot in any way stop it. Such as conv(zeros(umpteen,1), ones(umpteen,1)). A big red, working "stop" button would have been nice.
I like to run my scripts, insert break-points, then test stuff using command-line on the variables available. In recent versions, I have not been able to define new variables that way easily, having to declare them as global (??)
I would have really liked the core matrix-syntax to be even cleaner (not having scalars being 1x1 2d arrays for instance).
I would have liked some sort of extension of the matrix syntax into tensors.
I really hate the frustration when I go from compact, vectorized, readable MATLAB-code and have to dip my toes into "real" programming languages, where you spend most of your time concentrating on the implementation instead of the functionality :-D
  댓글 수: 1
Steven Lord
Steven Lord 20 Aug 2019
For the first point, this won't work for all "low-level function"s but the Pause button in the Editor, introduced in release R2016a, may be of use to you as may the Array Size Limit preference introduced in release R2015a.
Yes, I know I'm responding to an eight year old message. I just noticed it and wanted to add the relevant information in case others had the same frustration.

댓글을 달려면 로그인하십시오.


Chad Greene
Chad Greene 27 Mar 2015
I'd like new installations of Matlab to be able to grab preference settings from previous versions installed on my computer. It's minor, but spending 20 minutes sifting through M-Lint settings and fonts and background colors is just enough of a hassle to keep me from upgrading twice a year. I wish upgrading Matlab were as easy as upgrading Firefox.
  댓글 수: 12
Rik
Rik 29 Jul 2018
I would agree. I started with Matlab just before the ribbon was introduced, and at first I thought it was superfluous, but now it just feels part of the look of Matlab. It does add an easy way to get to often used controls.
RE space issue: I have my taskbar to the side, and I have an IM program docked, so my usable area is close to 4:3 screen ratio, which I think is way better.

댓글을 달려면 로그인하십시오.


yunhui zhou
yunhui zhou 19 May 2019
  1. Mathworks hides the direct download link for update release since Matlab R2018b, and force regular users (not license administrators) to update the software by clicking the bell-shaped button within the software.
  2. I cannot use Matlab anymore when it is downloading the update release.
  3. The download speed from my lab to the Mathworks's server is awful.
  4. I have serveral Matlab installations (same version) to maintain in my lab, and without an offline update release installation package, they all have to download the same update package and go through this awfully long update process. I have no idea why the Mathworks thinks updating within the software is the optimal experience.
Solution for anyone suffering from this:
The update package for Matlab R2018b can be directly downloaded at: https://www.mathworks.com/downloads/web_downloads/show_updates?release=R2018b
The update package for Matlab R2019a can be directly downloaded at: https://www.mathworks.com/downloads/web_downloads/show_updates?release=R2019a

Jan
Jan 21 Feb 2011
"load file.mat" saves 3 keystrokes compared to "load('file.mat')", but I've spent more than 600 keystrokes in answering desperate question in CSSM, Answers and goMatlab about using a variable as file name.
The HELP text of SAVE and LOAD explains the needed arguments explicitely. Therefore it is not Matlab, which frustrates me in this point, but the fact that a lot of Matlab beginners are overstrained by the tricky and actually not useful feature of non-functional forms of commands - and that even a good help text cannot intercept these problems.
  댓글 수: 3
Rik
Rik 20 Aug 2019
I would suggest adding an m-lint warning for this syntax, but I doubt that would be implemented, and I doubt it would help (for the reasons dpb mentions).

댓글을 달려면 로그인하십시오.


Royi Avital
Royi Avital 27 Mar 2011
  • The lack of built in 64 bit compiler (MATLAB used to work with Photoshop out of the box).
  • The graphics stack performance. It's so slow!
  • Editor - I wish the editor could add rich text editing capabilities for code documentation (Adding LaTex, Graphs, etc...).
  댓글 수: 4