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

mehr als 11 Jahre vor | 1

| akzeptiert

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 5

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

mehr als 11 Jahre vor | 0

Beantwortet
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); %...

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 1

| akzeptiert

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

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
'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 =...

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 3

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

mehr als 11 Jahre vor | 1

| akzeptiert

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

mehr als 11 Jahre vor | 1

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

mehr als 11 Jahre vor | 3

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

| akzeptiert

Mehr laden