Respondida
Simpler way without for loops
I would just keep the |for|-loops. Alternatively, you could use |sub2ind| to build a linear index from the pieces and then ...

más de 11 años hace | 1

| aceptada

Respondida
Sketetonize 3D stack of binary images
It is rather difficult to skeletonize in 3d. I remember looking for this in grad school and never found anything. However, thi...

más de 11 años hace | 0

| aceptada

Respondida
How to avoid syms in Simulink
Since you're not generating code from it, you could use the "Interpretted MATLAB Function Block" which should allow for the use ...

más de 11 años hace | 0

Respondida
Can you fold a highlighted selection of code?
I think the bigger question is why do you have more than 1000 lines in a file? Consider breaking it out into smaller managea...

más de 11 años hace | 0

Respondida
dicarding the mth binary digit
A(:,2:end)

más de 11 años hace | 0

| aceptada

Respondida
How to pass function arguments to publish.m?
The string will be |eval|-ed so pass it in to publish telling it where to find _x_. For example: x = magic(10); publish f...

más de 11 años hace | 0

Respondida
What is the correct syntax for num2str
First, |set| is a very important MATLAB function so I would advise against shadowing it with a variable. You would need to co...

más de 11 años hace | 0

Respondida
Finding the number of integers in a vector
nnz(v==round(v) & v>0)

más de 11 años hace | 0

| aceptada

Respondida
Any advice on making a poker game?
Build on the cyclist's idea, I would identify card numbers from 1:52 based on |mod(card,13)| mod(1:52,13) This will save...

más de 11 años hace | 0

Respondida
how to capture certain area of screen
No reason to reinvent the wheel. <http://www.mathworks.com/matlabcentral/fileexchange/24323-screencapture-get-a-screen-captur...

más de 11 años hace | 0

Respondida
()-indexing must appear last in an index expression.
MATLAB does not support cascaded indexing. You'll need to either create a new variable and index into it or use an anonymous fu...

más de 11 años hace | 0

Respondida
GUI Data Acquisition Backwards
Put a break point on that line throwing the error and stop to see what's happening, what is HeadRight? Where did it come from? ...

más de 11 años hace | 0

Respondida
How to fix Cell contents assignment to a non-cell array object ERROR?
Filename must exist as something else (non-cellular) beforehand. It works fine for me: clearvars for i=1:10 file...

más de 11 años hace | 5

Respondida
ismember for string matrix
You need to make A and B cell arrays so that each string piece is a separate element (rather than a 1xn string. The fix is simp...

más de 11 años hace | 0

Respondida
Read out intensites and corresponding X,Y,Z-coordinates from a 3D-image
load mri D = squeeze(D); idx = logical(D); % Where in D is nonzero? vals = D(idx); % extract values ind = find(idx); %...

más de 11 años hace | 0

Respondida
how to exit the occupy of the license of a matlab toolbox?
Restart MATLAB.

más de 11 años hace | 0

| aceptada

Respondida
Naive Bayes Classification for categorical values
Convert the categoricals to doubles. c = categorical({'red';'blue';'red'}) double(c)

más de 11 años hace | 0

| aceptada

Respondida
matrix divide in an array or 2d matrix.
You can do the whole divide at once, using n instead of 10000 to avoid killing my laptop: mat2 = reshape(mat,n^2,15); nm2 ...

más de 11 años hace | 0

| aceptada

Respondida
does nonlcon works for gamultiobjective Matlab r2014a
The ability for |gamultiobj| to support nonlinear constraints was added in R2014b. <http://www.mathworks.com/help/releases/R2...

más de 11 años hace | 0

Respondida
Where shall I put my "toolbox" my company provides for MATLAB?
You can put them anywhere and then just add them to the MATLAB path ( |addpath/pathtool| ). I would advise against putting them...

más de 11 años hace | 1

| aceptada

Respondida
How to find the iteration number which gave me specific result?
Store the iteration number as well as the minimum. Or just use min with two outputs [minv, idx] = min(A)

más de 11 años hace | 0

| aceptada

Respondida
'Clipping' the quiver plot
In R2014b, turning the clipping off works as I would expect: quiver(0.5,0.5,1,1) axis([0 1 0 1]) ax = gca; ax.Clipping =...

más de 11 años hace | 0

| aceptada

Respondida
Loop confusion while assigning a function to a grid
mygrid = whatever for ii = 1:numel(mygrid) Y(ii) = call_my_function(mygrid(ii)) end

más de 11 años hace | 0

Respondida
What platforms does MatLab Base run off?
<http://www.mathworks.com/support/sysreq/previous_releases.html>

más de 11 años hace | 0

Respondida
Stopping a paused script
I would suggest a different approach. Rather than using a |pause|, put a break point on the line you want to pause on. Then ...

más de 11 años hace | 3

Respondida
Making two different color maps in 2014b
You can still use the freezecolors approach or one like I use in my <http://www.mathworks.com/matlabcentral/fileexchange/29485-m...

más de 11 años hace | 1

| aceptada

Respondida
showing different parts of a dataset with different symbols in a scatterplot
% Synthetic data x = rand(60,1); y = rand(60,1); % Plotting scatter(x(1:20),y(1:20),'r*'); hold on scatter(x(21:...

más de 11 años hace | 1

Respondida
3-D matrix transpose
permute(A,[2 1 3]) |permute| is the way to generalize transpose-like operations in ND.

más de 11 años hace | 3

| aceptada

Respondida
How to clear classes except some variables?
You shouldn't have to clear classes, this is a nuclear hammer approach. You need to clear classes when you the blueprint of the...

más de 11 años hace | 0

Respondida
Datafeed toolbox - IQFeed fails with a callback error?
Possibly a path issue, give this a try. If it doesn't work, then call tech support: restoredefaultpath rehash toolboxcach...

más de 11 años hace | 0

| aceptada

Cargar más