Réponse apportée
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 ...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 11 ans il y a | 0

Réponse apportée
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...

plus de 11 ans il y a | 0

Réponse apportée
dicarding the mth binary digit
A(:,2:end)

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 11 ans il y a | 0

Réponse apportée
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...

plus de 11 ans il y a | 0

Réponse apportée
Finding the number of integers in a vector
nnz(v==round(v) & v>0)

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 11 ans il y a | 0

Réponse apportée
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...

plus de 11 ans il y a | 0

Réponse apportée
()-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...

plus de 11 ans il y a | 0

Réponse apportée
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? ...

plus de 11 ans il y a | 0

Réponse apportée
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...

plus de 11 ans il y a | 5

Réponse apportée
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...

plus de 11 ans il y a | 0

Réponse apportée
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); %...

plus de 11 ans il y a | 0

Réponse apportée
how to exit the occupy of the license of a matlab toolbox?
Restart MATLAB.

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Naive Bayes Classification for categorical values
Convert the categoricals to doubles. c = categorical({'red';'blue';'red'}) double(c)

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 11 ans il y a | 0

Réponse apportée
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...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
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)

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
'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 =...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Loop confusion while assigning a function to a grid
mygrid = whatever for ii = 1:numel(mygrid) Y(ii) = call_my_function(mygrid(ii)) end

plus de 11 ans il y a | 0

Réponse apportée
What platforms does MatLab Base run off?
<http://www.mathworks.com/support/sysreq/previous_releases.html>

plus de 11 ans il y a | 0

Réponse apportée
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 ...

plus de 11 ans il y a | 3

Réponse apportée
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...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
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:...

plus de 11 ans il y a | 1

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

plus de 11 ans il y a | 3

| A accepté

Réponse apportée
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...

plus de 11 ans il y a | 0

Réponse apportée
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...

plus de 11 ans il y a | 0

| A accepté

Charger plus