Question

"valid indices for 'a' are restricted in PARFOR loops" for unindexed struct?

For the following code: parfor k = 1:2 a.b = k; end I'm getting the error "valid indices for 'a'...

etwa ein Jahr ago | 1 answer | 0

Question

Avoid refocusing editor to current line after error when debugging?

When debugging/building a functions/scripts, I'll often run blocks of edited code while execution is paused. Frequently, this re...

etwa ein Jahr ago | 1 answer | 0

Answered

Undocumented behavior of smooth()?

From Mathworks support: _I have submitted an enhancement request for this to be considered and officially documented in futur...

Undocumented behavior of smooth()?

From Mathworks support: _I have submitted an enhancement request for this to be considered and officially documented in futur...

fast 2 Jahre ago | 0

| accepted

Question

Undocumented behavior of smooth()?

*Update*: I submitted a support request for this issue, and it's been forwarded to the development and documentation teams. *...

fast 2 Jahre ago | 1 answer | 1

Question

Best way to keep sequential graphics-updating commands from interfering?

I've noticed that sometimes, performing multiple graphics-manipulating actions in immediate succession can lead to irregularitie...

etwa 2 Jahre ago | 1 answer | 1

Question

Generate comma separated list in single line of code?

I would like to put a piece of code within an expression which generates a comma separated list, *without* having to create a du...

etwa 2 Jahre ago | 3 answers | 0

Question

Index slice of ND array of unknown dimension

Let's say I have a 3D array A, and I want to remove a slice: A(i,:,:) = []; But what if I don't know the dimension of th...

etwa 2 Jahre ago | 1 answer | 0

Question

Calculation of Schur complement returns matrix which is not positive semidefinite

I'm trying to implement some basic Gaussian process regression. I know Matlab has functions that do this but I want to do a bit ...

etwa 2 Jahre ago | 0 answers | 0

Question

Why is pca() faster than svd()?

The <https://www.mathworks.com/help/stats/pca.html documentation for the pca() function> says that 'svd' is the default algorith...

mehr als 2 Jahre ago | 1 answer | 0

Answered

Function like text() but with auto placement like legend?

Here's another hack, based on a suggestion from Mathworks support. function hOut = AutoText(textString,varargin) l =...

Function like text() but with auto placement like legend?

Here's another hack, based on a suggestion from Mathworks support. function hOut = AutoText(textString,varargin) l =...

mehr als 2 Jahre ago | 0

Question

Function like text() but with auto placement like legend?

Does such a function exist which simply addes some text to a plot, without having specify the x/y location, and without also add...

mehr als 2 Jahre ago | 4 answers | 0

Question

Hacky unconstrained vs. constrained numerical optimization

Short version: Why is unconstrained optimization with a constraint "hacked" into the objective function working while constraine...

mehr als 2 Jahre ago | 0 answers | 0

Answered

What is the rationale for letting DataAspectRatio (etc.) be inaccurate while stretch-to-fit is enabled?

From The Mathworks support: _The stretch-to-fill behavior is not taken into account in daspect when stretch-to-fill is on due...

What is the rationale for letting DataAspectRatio (etc.) be inaccurate while stretch-to-fit is enabled?

From The Mathworks support: _The stretch-to-fill behavior is not taken into account in daspect when stretch-to-fill is on due...

mehr als 2 Jahre ago | 0

| accepted

Answered

How to get accurate DataAspectRatio when stretch-to-fit is enabled?

From Mathworks support: _The technique of setting bpaspect to manual and then back may be "safe" (although I wouldn't be surp...

How to get accurate DataAspectRatio when stretch-to-fit is enabled?

From Mathworks support: _The technique of setting bpaspect to manual and then back may be "safe" (although I wouldn't be surp...

mehr als 2 Jahre ago | 0

| accepted

Answered

Need help understanding stretch-to-fit associated behavior

Answer is <https://www.mathworks.com/help/matlab/ref/axes-properties.html?s_tid=srchtitle#property_d0e56952 here>. When LimitMod...

Need help understanding stretch-to-fit associated behavior

Answer is <https://www.mathworks.com/help/matlab/ref/axes-properties.html?s_tid=srchtitle#property_d0e56952 here>. When LimitMod...

mehr als 2 Jahre ago | 0

| accepted

Question

How to get accurate DataAspectRatio when stretch-to-fit is enabled?

Matlab <https://www.mathworks.com/help/matlab/ref/daspect.html#bus0nbw documentation> states that when stretch-to-fill is enable...

mehr als 2 Jahre ago | 1 answer | 0

Question

What is the rationale for letting DataAspectRatio (etc.) be inaccurate while stretch-to-fit is enabled?

Matlab <https://www.mathworks.com/help/matlab/ref/daspect.html#bus0nbw documentation> states that when stretch-to-fill is enable...

mehr als 2 Jahre ago | 1 answer | 0

Question

Need help understanding stretch-to-fit associated behavior

Matlab <https://www.mathworks.com/help/matlab/ref/daspect.html#bus0nbw documentation> states that when stretch-to-fill is enable...

mehr als 2 Jahre ago | 1 answer | 0

Question

How to equalize width & aspect between axes?

I have two plots stacked vertically. In one, the x and y data have the same units, so I'm using "axes equal." In the second, x &...

fast 3 Jahre ago | 1 answer | 0

Question

Python in Matlab: accessing list of lists

I have some code that generates a Python list of Python lists. Unfortunately I don't seem to be able to access the contents. I g...

fast 4 Jahre ago | 1 answer | 0

Question

mdl object: put "F-statistic vs. constant model: ... , p-value = ..." into variable

fitlm() displays, among other things, the F-statistic and p-value for the fit as a whole. I can't find these values in the mdl o...

etwa 4 Jahre ago | 2 answers | 0

Question

finddelay returns identical value (0) for "best" and "worst" case.

I'm curious about what the reasoning could be for having finddelay() return 0 if no significant correlation is found. That means...

etwa 4 Jahre ago | 1 answer | 0

Question

Running Python script with oauth2 via matlab

I'm trying to run a Python script that updates a Google spreadsheet with values calculated with Matlab. I'm using the <https://g...

etwa 4 Jahre ago | 0 answers | 0

Answered

Update Python module in Matlab

Editing and reloading a Python® module in the same MATLAB session. To use an updated module, restart MATLAB. Also see: <htt...

Update Python module in Matlab

Editing and reloading a Python® module in the same MATLAB session. To use an updated module, restart MATLAB. Also see: <htt...

etwa 4 Jahre ago | 0

| accepted

Question

Update Python module in Matlab

I'm trying to run a Python script using Matlab's built-in py. It's pretty simple, but I'm running into some difficulty drying to...

etwa 4 Jahre ago | 1 answer | 0

Question

Error importing matlab.engine into Python

I tried the solution from a <http://www.mathworks.com/matlabcentral/answers/221969-matlab-engine-for-python-import-failure previ...

etwa 4 Jahre ago | 1 answer | 0

Answered

-maxNumCompThreads, hyperthreading, and parpool

I was wrong about maxNumCompThreads not working on parpool workers. I think the problem was that the code I was using: parf...

-maxNumCompThreads, hyperthreading, and parpool

I was wrong about maxNumCompThreads not working on parpool workers. I think the problem was that the code I was using: parf...

fast 5 Jahre ago | 0

| accepted

Question

physical vs. logical core allocation for Matlab in slurm

I'm a user on a slurm cluster which is configured to consider each physical core to have two CPUs for allocation (via hyperthrea...

fast 5 Jahre ago | 1 answer | 0

Question

-maxNumCompThreads, hyperthreading, and parpool

I'm running Matlab R2014a on a node in a Linux cluster that has 20 cores and hyperthreading enabled. I know this has been discus...

fast 5 Jahre ago | 2 answers | 1