MATLAB Answers

Paulo Silva
12

What is missing from MATLAB?

Paulo Silva
さんによって質問されました 2011 年 2 月 14 日
最新アクティビティ cui
さんによって 編集されました 2019 年 8 月 16 日 15:04
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?

  7 件のコメント

Jeff Owen
2018 年 1 月 2 日
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'.
Jeff Owen
2018 年 1 月 2 日
Oops, turns out it is there. I just tried 'VerticalAlignment','top' and it works. Should be included in the help file associated with 'text'?
Stephen Cobeldick
2018 年 1 月 9 日
"... 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).

サインイン to comment.

113 件の回答

Walter Roberson
回答者: Walter Roberson
2011 年 2 月 14 日
 採用された回答

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

  12 件のコメント

Walter Roberson
2016 年 6 月 30 日
(This has not been implemented yet, as of R2016a)
timo
2016 年 9 月 1 日
yay
MINATI
2019 年 2 月 25 日
Also in solving ode (BY bvp4c) if we take variation of any parameter in X-axis when previously f ' varies with x
Ref: https://in.mathworks.com/matlabcentral/answers/396548-how-to-plot-for-t0-5-y-axis-vs-nt-ranges-from-0-1-to-0-5-in-x-axis-where-alre

サインイン to comment.


Jan
回答者: Jan
2011 年 2 月 14 日

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.

  7 件のコメント

Jan
2012 年 4 月 26 日
There is a new service pack for 2010b, although it is 2012 now. I do not have 2010b, such that I cannot download the SP2 and check the improvements. But I'm positively impressed by this special support activity!
I think it is worth to announce this update in public, because it increases the user's trust in the reliability of Matlab substantially.
Walter Roberson
2016 年 6 月 30 日
(This has not been implemented yet, as of R2016a)
dpb
2019 年 2 月 25 日
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.
"Geezer Alert!"
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.

サインイン to comment.


Login_Name
回答者: Login_Name
2011 年 2 月 14 日

Real pass by reference.

  4 件のコメント

Peter O'Connor 2011 年 2 月 15 日
should just have an option to create matrices that act as if they were subclasses of handle (pointers).
ie a=rand(1,1000000); b=a; a(1)=2; takes a long time, a(1)~=b(1)
a=*rand(1,1000000); b=a; a(1)=2; would be fast, a(1)==b(1). this'd be practical if calling functions to modify, not copy, a large matrix.
Malcolm Lidierth 2011 年 4 月 27 日
Peter
How about this?
classdef databucket < handle
properties (Access='public')
Bucket
end
methods
function obj=databucket(data)
obj.Bucket=data;
return
end
function varargout=subsref(obj, varargin)
varargout{1:nargout}=subsref(obj.Bucket, varargin{:});
return
end
function varargout=subsasgn(obj, varargin)
varargout{1:nargout}=subsasgn(obj.Bucket, varargin{:});
return
end
end
end
I've created a set classes that do something like this using data on file, either memory mapped or accessed using low-level i/o so the "Bucket" can be many Gb without having them in memory all at once. With extra work to overload size, double etc and make X(:) a special case, these "nakhur" classes can be used anywhere a double precision array can be used in m-code.
owr
2011 年 7 月 21 日
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.

サインイン to comment.


Doug Hull
回答者: Doug Hull
2011 年 2 月 14 日

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.

  3 件のコメント

Jan
2011 年 2 月 14 日
I suggest: Discuss at first here, forward the results afterwards.
Michelle Hirsch 2011 年 2 月 17 日
I'm certainly watching the discussion! Jan's idea is a good one. You may want to mention if a particular suggestion happened to get lots of votes.
Thanks to all of you for your input.
Julian
2011 年 4 月 21 日
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.

サインイン to comment.


回答者: Aurelien Queffurust 2011 年 2 月 18 日

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

  5 件のコメント

Steven Lord
2016 年 9 月 1 日
That is a known issue captured in bug report 1376893.
Steven Lord
2017 年 9 月 22 日
Bug report 1376893 was marked as fixed in release R2016b, and the Release Notes for MATLAB in both release R2017a and release R2017b say that loading apps in App Designer is faster.
Steven Lord
2018 年 9 月 13 日

In release R2018b, the Release Notes has two entries relevant to this question:

  • "Building Apps: Faster canvas interactions in App Designer"
  • "Running Apps: Faster startup time for apps"

サインイン to comment.


Jan
回答者: Jan
2011 年 2 月 14 日

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 件のコメント

Royi Avital 2012 年 8 月 31 日
+1
Walter Roberson
2016 年 6 月 30 日
(This has not been implemented yet, as of R2016a)

サインイン to comment.


Walter Roberson
回答者: Walter Roberson
2011 年 2 月 14 日

Graphic support for arbitrary unicode characters.

  3 件のコメント

Ian
2011 年 3 月 15 日
yes please! surely matlab should be unicode friendly by now!
Walter Roberson
2016 年 6 月 30 日
(This has been added in more places, as of R2014b. If I understand correctly there are still a few places that cannot handle Unicode; some parts of Simulink, I think I read, and the TeX and LaTeX interpreters do not have Unicode support.)
Walter Roberson
2017 年 7 月 27 日
I have been able to use unicode characters with TeX, but not with LaTeX.

サインイン to comment.


Walter Roberson
回答者: Walter Roberson
2011 年 2 月 16 日

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.

  4 件のコメント

Ian
2011 年 3 月 15 日
I would really love to see this too, even if all we have access to is the byte stream result of save we could route somewhere else. Ideally there would be a defined intermediate format.
Mike
2011 年 9 月 14 日
Yes, Something like this is needed.
Walter Roberson
2016 年 6 月 30 日
(This has not been implemented yet, as of R2016a)

サインイン to comment.


Oleg Komarov
回答者: Oleg Komarov
2011 年 2 月 17 日

Anti-aliasing... MYAA

  2 件のコメント

Michael Johnston 2011 年 8 月 3 日
Yeah, it's kind of ridiculous that we need to go to the File Exchange to be able to produce reasonable looking figures. The figure export options in MATLAB are pretty weak because they're not WYSWIG... lots of trial and error and visits to File Exchange required to produce something that looks decent in a PDF.
Walter Roberson
2016 年 6 月 30 日
(Anti-Aliasing was improved from R2014b or a release soon after that. I gather it still has some oddities as of R2016a.)

サインイン to comment.


Walter Roberson
回答者: Walter Roberson
2011 年 2 月 14 日

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.

  7 件のコメント

Adam
2019 年 3 月 22 日
I tend to use the GUI Layout toolbox for this kind of thing.
Steven Lord
2019 年 3 月 22 日
I've forwarded this particular answer to some of the people responsible for App Designer.
Adam
2019 年 3 月 22 日
I would also agree with Image Analyst on App Designer. I like some aspects of it and the direction it promises, but I don't find it in any way usable, for numerous reasons, a few of which I've passed on, others I have probably forgotten as I haven't used it for quite a while now.

サインイン to comment.


回答者: Ben Petschel 2011 年 6 月 8 日

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)".

  5 件のコメント

Steven Lord
2016 年 6 月 30 日
Release R2016a introduced a Pause button in the editor. Using it temporarily interrupts execution and enters debug mode. See the item in the Desktop section of the Release Notes for MATLAB for that release.
Steven Lord
2016 年 9 月 15 日
As of release R2016b you can now define local functions inside of script files.
Walter Roberson
2016 年 9 月 15 日
That is a good step towards solving a common problem (though one I probably would have solved by expanding the error message...), but I suspect that now more than ever people are going to be wanting to copy and paste entire scripts with functions to the command line.

サインイン to comment.


Walter Roberson
回答者: Walter Roberson
2011 年 2 月 14 日

An equivalent to the ?: operator, in which the unselected part does not get evaluated.

  3 件のコメント

Jan Rubak
2011 年 2 月 14 日
I've wished for the same, especially for use in anonymous functions.
David Goldsmith 2011 年 3 月 16 日
"I've wished for the same" many times...
Walter Roberson
2016 年 6 月 30 日
(This has not been implemented yet, as of R2016a)

サインイン to comment.


回答者: Peter O'Connor 2011 年 2 月 15 日

ability to enter default inputs like in python as in function out=foo(bar,bar1='arr',bar2='yarr') ...

  6 件のコメント

Ben Petschel 2011 年 6 月 8 日
A nice feature of the R language is non-constant default inputs, for example function(x,n=length(x)), whereas Python defines the defaults at compile time. Having this feature as well as named arguments in the function call such as foo(n=1) would save the tedium of processing varargin.
Walter Roberson
2016 年 6 月 30 日
(This has not been implemented yet, as of R2016a)
Royi Avital 2017 年 3 月 16 日
I think Octave implemented this.

サインイン to comment.


Daniel Shub
回答者: Daniel Shub
2012 年 4 月 5 日

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.

  5 件のコメント

Walter Roberson
2016 年 6 月 30 日
(This has not been implemented yet, as of R2016a)
Walter Roberson
2016 年 6 月 30 日
I have started playing with Virtual Machines on my Mac. I might still have an XP install disk around, so I could potentially install quite a few versions back. However, I have not found any way of figuring out the names of the internal routines that do not happen to have a corresponding .m file for documentation purposes.
Jan, do you have an automated discovery routine that can be pointed at a base installation? Easiest would be if it did not require running the release so I didn't have to install the old OS's.
I do not have access to all toolboxes, but we could at least get somewhere.
Steven Lord
2016 年 7 月 1 日
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.

サインイン to comment.


Walter Roberson
回答者: Walter Roberson
2011 年 2 月 14 日

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

  1 件のコメント

Walter Roberson
2016 年 6 月 30 日
(This has not been implemented yet, as of R2016a)

サインイン to comment.


Walter Roberson
回答者: Walter Roberson
2011 年 2 月 14 日

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 件のコメント

Walter Roberson
2016 年 6 月 30 日
(This has not been implemented yet, as of R2016a)
dpb
2017 年 3 月 16 日
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...

サインイン to comment.


Walter Roberson
回答者: Walter Roberson
2011 年 2 月 15 日

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.

  4 件のコメント

Royi Avital 2013 年 6 月 21 日
What's the difference between FEX and MEX?
Walter Roberson
2013 年 6 月 21 日
FEX is the MATLAB File Exchange. MEX is the MATLAB API and compiling tool for C, C++, and Fortran to interface with MATLAB.
Walter Roberson
2016 年 6 月 30 日
(This has not been implemented yet, as of R2016a)

サインイン to comment.


Walter Roberson
回答者: Walter Roberson
2011 年 2 月 16 日

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.

  2 件のコメント

Walter Roberson
2011 年 2 月 17 日
I think it would be acceptable for this purpose to introduce a new IOStream object, with IOStream(fid) pulling out the object for the file id #fid . To start the basic properties of the IOStream would be the fields you get from applying fopen() to that fid.
A Position property when read could substitute for ftell(fid), and when set could substitute for fseek(fid,POS,'bof') .
Mainly, though, by having a distinct object class wrapping the fid, it would become easier to overload methods, especially in places where a file name string is expected as the first parameter.
imwrite(Array,IOStream(4)) would write to the given stream rather than to a file name.
This becomes more powerful when you allow IOStreams to become associated with blocks of memory, as per traditional unix memmap semantics -- which allow dual access through the fid and through memory
Or perhaps it would be better to have an IOObject class with subclasses for "stream" (non-seekable) and "block" (seekable) objects. That leads into possibilities such as asynch reads with callbacks, and scatter-gather I/O... maybe even DMA to devices...
Walter Roberson
2016 年 6 月 30 日
(This has not been implemented yet, as of R2016a)

サインイン to comment.


Walter Roberson
回答者: Walter Roberson
2011 年 2 月 16 日

Pipes / popen() / ability to communicate interactively with other programs without having to use tcp/udp .

  1 件のコメント

Walter Roberson
2016 年 6 月 30 日
(This has not been implemented yet, as of R2016a)

サインイン to comment.


Walter Roberson
回答者: Walter Roberson
2011 年 2 月 18 日

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}

  2 件のコメント

Walter Roberson
2016 年 6 月 30 日
(This was implemented about R2014b.)
Walter Roberson
2017 年 7 月 27 日
(However, handling spaces in a %D format requires that the WhiteSpace property be set to exclude spaces.)

サインイン to comment.


回答者: David Goldsmith 2011 年 3 月 16 日

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.)

  7 件のコメント

Image Analyst
2013 年 8 月 26 日
Yes, that's it! I think it's a major omission that this function doesn't come up when you search for "color" in the help, and it's not even listed as a "see also" in the ColorSpec page of the help. I'll send in a feature request for that. Thanks for telling us about this function.
Jan
2013 年 8 月 28 日
@IA: It is easy to find:
docsearch color
Then it is about the 600th(!) element in the list on the left, when you sort the results alphabetically, what has been possible in the help browser of R2009a. In R2011b I do not find uisetcolor through docsearch at all. And after too many negative opinions I'm not eager to search in the help browser of R2013a.
So you are right: This will be an important enhancement request. I post a question here also, because it will be published earlier than the modified help text most likely ;-)
Walter Roberson
2013 年 8 月 28 日
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.

サインイン to comment.


Dan K
回答者: Dan K
2012 年 1 月 27 日

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 件のコメント

Walter Roberson
2012 年 1 月 28 日
Also, we get a surprising number of requests for log-polar plots. Yes, that causes problems for rho that are negative, and requires an infinite amount of canvas to represent from rho = 0 to any positive rho, but people want it anyhow.
Steven Lord
2016 年 6 月 30 日
Release R2016a introduced the polarplot and polaraxes functions.

サインイン to comment.


Ken
回答者: Ken
2013 年 2 月 6 日

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.

  1 件のコメント

craq
2013 年 4 月 3 日
I wondered that myself, especially since clicking on the else will show you the corresponding if. I'd add switch/case to your list.

サインイン to comment.


Jim Hokanson
回答者: Jim Hokanson
2013 年 4 月 11 日

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 ...

  0 件のコメント

サインイン to comment.


Sean de Wolski
回答者: Sean de Wolski
2011 年 2 月 14 日

Mathcad-like sheets, where things can be easily displayed for the purpose of someone checking your calculations.

  4 件のコメント

K E
2012 年 1 月 12 日
And you could insert figures/links/cartoons
Walter Roberson
2016 年 6 月 30 日
("live scripts" as of R2016a goes part way towards this. But only for scripts, where-as I write nearly all my non-trivial code into functions.
Steven Lord
2018 年 3 月 15 日
In release R2018a, we introduced the ability to create live functions and to debug code in the Live Editor.

サインイン to comment.


Walter Roberson
回答者: Walter Roberson
2011 年 2 月 14 日

Explicit render to a buffer (array). There are some things that this makes much easier!

  4 件のコメント

Walter Roberson
2011 年 2 月 14 日
Think of getframe() or saveas()'s ability to save an interactive image to memory or a file. Now skip the getframe() or savas() step by allowing the user to say, e.g.,
renderer buffer VARIABLENAME
and have the pixel results written directly to the variable. You'd possibly need a dots-per-inch kind of parameter in order to determine the drawing density and the virtual screen size, and an option to only capture between certain coordinates would be nice.
For example, the other day someone asked a question in cssm: they had constructed a shaded patch and wanted to capture the pixels along the surface of it for use in further processing. Not an easy task with the current rendering, especially if you want higher resolution than is available on your screen.
Oh yeah, and this render-to-buffer option should be available in batch mode!
Walter Roberson
2011 年 2 月 15 日
Rendering to a 3D array would naturally result in RGB. Rendering to a 4D array might usefully include alpha information in some cases. I imagine that in some cases people might want to render to CMYK or YCrCb; at the moment there are a few routines that can translate RGB to CMYK or YCrCb but those need to stay within the gamut that is representable in both, and I don't know that it would be a priority to support full gamuts for those color spaces.
Now as to what rendering to a 2D array should mean... *If* the rendered area did not include any ticks or axes marks or text() or line() or patch() objects with interpolated shading... if, in other words, everything being rendered was exactly representable in terms of the current colormap, then rendering as pseudocolor indices might make sense. It does not take much, though, to destroy this -- for example, there is no current way to specify that plot lines or plot markers are to be drawn in terms of a pseudocolor index. The standard colors such as 'r' are defined as being in a "system colormap" outside of any figure colormap.
Walter Roberson
2016 年 6 月 30 日
(This has not been implemented yet, as of R2016a)

サインイン to comment.


Walter Roberson
回答者: Walter Roberson
2011 年 2 月 14 日

eval() a char array or cell-string array as a multi-line input, allowing continuations and multi-line constructs such as
if (condition)
%do something
else
%do something else
end

  8 件のコメント

Bjorn Gustavsson 2011 年 3 月 3 日
Amazing/amusing!
eval(sprintf('for i1 = 1:10,\n if i1>3\n disp(i1) \n else\n disp(''i1'') \n end \n end\n%%a comment\n'))
Ben Petschel 2013 年 11 月 12 日
I don't understand - statements like
eval('if 1, disp(''a''); else, disp(''b''); end')
work from at least r2010a onwards
Walter Roberson
2013 年 11 月 12 日
Yes, Ben, but that string does not contain multiple lines. Commas and semi-colons do not mark the end of a line.

サインイン to comment.


Walter Roberson
回答者: Walter Roberson
2011 年 2 月 17 日

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.

  1 件のコメント

Walter Roberson
2016 年 6 月 30 日
(This has not been implemented yet, as of R2016a. But python integration is advancing.)

サインイン to comment.


Walter Roberson
回答者: Walter Roberson
2011 年 3 月 1 日

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)

  3 件のコメント

James Tursa
2011 年 3 月 16 日
Like Fortran :)
Walter Roberson
2011 年 3 月 16 日
All of the greats borrowed from each other ;-)
Walter Roberson
2016 年 6 月 30 日
(This has not been implemented yet, as of R2016a)

サインイン to comment.


Walter Roberson
回答者: Walter Roberson
2011 年 6 月 9 日

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 件のコメント

Walter Roberson
2016 年 6 月 30 日
(This has not been implemented yet, as of R2016a)

サインイン to comment.


Login_Name
回答者: Login_Name
2011 年 7 月 2 日

Use of wild cards and regular expressions with GET and SET.
get(gca,'camera*') % Should return 8 properties

  2 件のコメント

Jan
2011 年 7 月 7 日
@Matt: Getting the factory and default settings works for the root handle: "get(0, 'factory')". Using "P=get(gca); regexp(fieldnames(P), ...)" is an option, but not comfortable.
If additional fields have been attached to the object by "schema.prop", more than 8 fields are possible (even if this is unlikely).
Walter Roberson
2016 年 6 月 30 日
(This has not been implemented yet, as of R2016a)

サインイン to comment.


回答者: Ashish Bhatt 2012 年 3 月 12 日

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.

  4 件のコメント

Sean de Wolski
2012 年 3 月 12 日
@Jan, agreed - very dangerous.
@Ashish, you could write a function to this if it is very important to you. Just what you do here:
fprintf('I sometimes use C+%s','+')
?
Daniel Shub
2012 年 3 月 19 日
I personally would love some sort of formatting help in the MATLAB editor. Maybe auto formating of whitespace (as long as it doesn't get it wrong) like it does with tabbing, or maybe mlint warnings:
This project uses spaces after assignments (a = b;)
This project uses spaces between operators (a + b;)
This project requires commas followed by spaces ([a, b, c])
Where I can set the coding style. Also auto warnings on name clashes (yes mlint should know the name of ALL MATLAB functions) and camelCase etc.
Walter Roberson
2016 年 6 月 30 日
I would appreciate an auto-format that could take sections of code and apply formatting rules like space around assignment and space between operators.

サインイン to comment.


Walter Roberson
回答者: Walter Roberson
2011 年 2 月 14 日

Memory mapping to the bit level.

  3 件のコメント

Michelle Hirsch 2011 年 2 月 17 日
Walter - could you elaborate on why you would want this?
Walter Roberson
2011 年 2 月 17 日
To complete the memory mapping capabilities down to a level equivalent to C's struct()
nb: C does not specify which "end" of a word the bitfields fill from, and C does not specify the size of the "word" for packing purposes, just that if the current field is too wide to fit it will be put in to the next word. It would be good if these factors could be configured during the memory mapping.
Walter Roberson
2016 年 6 月 30 日
(This has not been implemented yet, as of R2016a)

サインイン to comment.


Walter Roberson
回答者: Walter Roberson
2011 年 2 月 14 日

An ability to directly call routines written in another language by having a Matlab-level wrapper that took a structured description of how to marshal the arguments and unmarshal the results. Even if in the first version it was only usable to pass read-only values, it would make calling external routines much simpler.

  2 件のコメント

Philip Borghesani 2011 年 2 月 14 日
This sounds like LOADLIBRARY to me. How is what you want different from what currently exists?
Walter Roberson
2011 年 2 月 14 日
I hadn't seen that before, but when I go through it it appears to me that there a a bunch of limitations that are not necessary.
One of them is that for the 64 bit version of Matlab you have to have a C compiler to use it. There appear to be others but I need to look more closely to see if there are ways to overcome the limits that I just didn't notice.

サインイン to comment.


Walter Roberson
回答者: Walter Roberson
2011 年 2 月 16 日

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.

  2 件のコメント

Walter Roberson
2011 年 2 月 17 日
And I found evidence suggesting that fseek(1,0,0) and fseek(2,0,0) don't work :(
Walter Roberson
2016 年 6 月 30 日
(This has not been implemented yet, as of R2016a. I do see that the existence of the 'W' and 'A' permissions of fopen() imply that flushing is normally continually done, but when you are writing code for efficiency or communicating with an external interface, you want explicit control over flushing. This is not "discard what is in the queue" flush, this is "ensure that the buffer is sent to the I/O system" flush, which traditionally has a non-blocking form and a blocking form.)

サインイン to comment.


Oleg Komarov
回答者: Oleg Komarov
2011 年 3 月 19 日

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.

  1 件のコメント

Walter Roberson
2016 年 6 月 30 日
(R2015a introduced some of these controls but under an undocumented name; R2015b used a different name and documented the facilities.)

サインイン to comment.


Walter Roberson
回答者: Walter Roberson
2011 年 6 月 13 日

If there is an atan2() function, why isn't there an acot2() function or acos2() or asin2() ?? Equal time for arc functions!

  1 件のコメント

Andrew Newell
2011 年 6 月 13 日
We shall overco-o-ome! We shall overco-o-ome! We shall overcome some day-a-a-a-ay!

サインイン to comment.


Daniel Shub
回答者: Daniel Shub
2012 年 4 月 19 日

I wish there were better functions for comparing performance across platforms and versions. Something like a stable bench on steriods.

  8 件のコメント

dpb
2017 年 9 月 30 日
That's good but scaling, while important isn't same as the comparison to prior release -- there are still speed issues of HG2 performance relative to HG1 in absolute speed aren't there? Seeems I still see such comments fairly regularly.
Walter Roberson
2017 年 9 月 30 日
"Our second goal was to support existing graphics functionality and to minimize the disruption to MATLAB users. We did that by evaluating every change that would introduce an incompatibility in the graphics system. We tested those changes in house with over 100,000 MATLAB files and in person with a large number of advanced graphics users to determine the following:"
dpb
2017 年 12 月 1 日
Compatibility is good as well, but still isn't the same as performance...still curious on that aspect. I can't point to it specifically but surely seem to recall some posts recently of comparisons when upgrading.

サインイン to comment.