Question

Enter debug mode if a variable changes value

I'm trying to debug somebody else's impenetrable matlab code; at the beginning of each iteration of a loop, I'm displaying the ...

ongeveer 3 jaar ago | 2 answers | 1

Question

Convert a symbolic vector to a list of scalar outputs for a function created by matlabFunction

When matlabFunction creates an anonymous function, its arguments are always scalars. But when I want to use the function, m...

ongeveer 3 jaar ago | 1 answer | 0

Question

how to use exist for a function that begins with an@

Following @JanSimon's suggestion in <https://www.mathworks.com/matlabcentral/answers/178671-is-it-possible-to-call-a-subfunctio...

ongeveer 3 jaar ago | 0 answers | 0

Question

Inconsistent behavior updating tick labeling

In the code below, I'm adding ticks to the Y axis. The first time I do it, YTickLabel updates correctly, adding an additional...

ongeveer 3 jaar ago | 1 answer | 0

Question

Use distinct colormaps for two different surf plots on the same figure

Using R2016b, I would like to create two surf plots and use a different colormap for each one. It appears that the only way ...

meer dan 3 jaar ago | 1 answer | 0

Question

Prevent automatic simplification of a symbolic expression when using the latex command

I have the following expression f = @(k,n)1.0./n.^(2.0./3.0).*(6.0.^(1.0./3.0).*k.^(1.0./3.0).*4.0-k.*n.^(2.0./3.0).*...

meer dan 3 jaar ago | 1 answer | 0

Question

Why do I receive this error "Support of character vectors that are not valid variable names or define a number will be removed in a future release. "?

I'm trying to differentiate an expression f which has a horrible coefficient, specifically, (4/3)^(5/6). I want to prevent matl...

bijna 4 jaar ago | 1 answer | 0

Question

Shortcircuiting multiple dbquit commands

Many times I find myself in a workspace, making an error, which throws me into debug mode, repeatedly making mistakes while tryi...

ongeveer 4 jaar ago | 0 answers | 0

Question

hatching a 3d patch object.

I'm wondering if anybody has built code for adding cross-hatches to a 3D patch object? I see that this task is on Kesh Ikuma's ...

meer dan 4 jaar ago | 1 answer | 0

Question

Limiting the extent of the crop using export_fig

I'm using export_fig with the following command (both options are necessary for me): export_fig('png','opengl',<filename>...

meer dan 4 jaar ago | 2 answers | 1

Question

Preventing focus theft while running matlab from the command line and creating figures

There have been several posts on this subject such as <https://www.mathworks.com/matlabcentral/answers/88176-keep-focus-in-comma...

meer dan 4 jaar ago | 1 answer | 1

Question

return the row and column number of the current subplot

is there a property of `gca` that will return the row and column number of the current subplot? e.g., I'd like a command that...

meer dan 4 jaar ago | 1 answer | 0

Question

Constructing a a family of anonymous functions by recursion.

I'm trying to define a sequence of functions recursively. The example below (which is obviously silly) illustrates the idea...

meer dan 4 jaar ago | 2 answers | 0

Question

set default properties of symbolic variables

Whenever I use the symbolic toolbox, I always want my symbolic variables to be real and non-negative. It's annoying to have to m...

meer dan 4 jaar ago | 1 answer | 0

Question

A flag to indicate whether or not the int function has successfully computed a symbolic integral

The example below indicates my problem. In the first case, matlab cannot integrate the function provided to it and simply retu...

meer dan 4 jaar ago | 1 answer | 0

Answered

Suppress Academic license notification

As root, edit the file $MATLABPATH/resources/MATLAB/en/branding.xml (Better back it up first! I forgot to) Change th...

Suppress Academic license notification

As root, edit the file $MATLABPATH/resources/MATLAB/en/branding.xml (Better back it up first! I forgot to) Change th...

meer dan 4 jaar ago | 3

Question

sort a one dimensional array ascend and descend

To sort a vector in ascending order it would seem completely obvious to type sort([1,3,2],1,'ascend') Who cares what the...

meer dan 4 jaar ago | 3 answers | 0

Question

Fine tuning a 3D figure without modifying the arguments of `view`

In the figure below, the cluster of stem lines to the left of the figure (a cluster is identified by a common color) are quite ...

meer dan 4 jaar ago | 2 answers | 0

Question

Interactive script to return from a matlab function

I'm trying to construct a matlab script that I can call from a matlab function, which will prompt me if I want to return to the ...

bijna 5 jaar ago | 2 answers | 0

Question

installing a new package

I'm trying to install an additional package of R2016a. My host is linux. Following instructions from I have the installer ...

bijna 5 jaar ago | 1 answer | 0

Question

Fragility of matlab's solve routine, possibly a bug?

I wrote a problem set for first time matlab programmers, which involved using the solve routine. Unfortunately, they discover...

bijna 5 jaar ago | 1 answer | 1

Question

Execute a command after a delay

Based on <https://www.mathworks.com/matlabcentral/answers/276660-command-for-delaying-matlab-to-execute-a-certain-line this thre...

bijna 5 jaar ago | 1 answer | 1

Question

Bug? sym alpha takes precedence over matlab's alpha.m at the command line, but not within a matlab function.

When I run the following code, there is no problem: syms xDot(t) t alpha dF_dxDot = @(t) -exp(-t)*alpha*xDot(t)^(...

bijna 5 jaar ago | 1 answer | 0

Question

access to matlab history while running in nodesktop mode

I'd like to have access to a file that has saved my command history while running in nodesktop mode. This question was asked in...

bijna 5 jaar ago | 2 answers | 0

Question

saved pdf file doesn't look like figure

When I save a figure as a pdf file, the pdf version adds spaces which aren't in the original. The two images attached illustrat...

bijna 5 jaar ago | 2 answers | 0

Question

Matlab central defaults to de.mathworks.com

I was in Switzerland, using matlab answers on chromium-browser, and was trying desperately to get the usa mathworks site, since ...

bijna 5 jaar ago | 1 answer | 0

Question

Matlab is inconsistent when raising numbers to the zero'th power:

In matlab R2015a -1^0 returns -1 but a = -1 ; a^0 returns 1 wolfram alpha agrees that -1^0 = -1...

ongeveer 5 jaar ago | 1 answer | 0

Answered

Execute a command on exit from a workspace

Here's an answer, obtained with the help of Matlab technical support %Keyboards in the CALLER workspace not current workspa...

Execute a command on exit from a workspace

Here's an answer, obtained with the help of Matlab technical support %Keyboards in the CALLER workspace not current workspa...

ongeveer 5 jaar ago | 0

| accepted

Question

Comparing cell arrays of symbolic variables

I'd like to be able to compare two arrays, each consisting of symbolic variables. In particular I'd like to be able to run set...

ongeveer 5 jaar ago | 1 answer | 0

Question

Solving an optimal control problem using filter?

I'm trying to solve a pair of difference equations for an economic problem. It appears from the web that the appropriate matlab...

ongeveer 5 jaar ago | 0 answers | 0