Risposto
K-means algorithm document
Please look at the documentation. <http://www.mathworks.com/help/stats/kmeans.html> Copy/pasting from there: *Referenc...

circa 12 anni fa | 0

| accettato

Risposto
Plotting filled markers with colors
b = bone(64);

circa 12 anni fa | 1

| accettato

Risposto
How to plot MESH only in black?
You could set the _colormap_ to black only, and use surf instead. [x,y] = meshgrid([-2:.2:2]); Z = x.*exp(-x.^2-y.^2); ...

circa 12 anni fa | 1

Risposto
interpolation vector with a lot of duplicate values
If there are several values for one coordinate, then you could, e.g. take the mean value of the abscissas for that coordinate an...

circa 12 anni fa | 3

| accettato

Risposto
How can I load GDS II into matlab?
# The hard way: find out how the GDSII binary is structured and read it directly into Matlab. # The compromise way: Use a GDSII...

circa 12 anni fa | 0

| accettato

Risposto
How do I loop through files saved in my workspace?
RA_1002_timecourse = rand(10); RA_893_timecourse = rand(10); %list variables in workspace myVars = whos; ...

circa 12 anni fa | 0

Risposto
can this loop be vectorized?
_bsxfun()_ is your friend: X = repmat(0:5:1000,201,1); Y = repmat((1000:-5:0)',1,201); x(1,1,1:3) = [50 326 800];...

circa 12 anni fa | 1

Risposto
How to use box plots for irregular x-axis intervals?
You can't. At least not if you use the _boxplot()_ function. You'd have to create your own variant. Alternatively you could cre...

circa 12 anni fa | 1

Risposto
Read Multiple Images from a Folder
http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F

circa 12 anni fa | 0

| accettato

Risposto
Generate automatically vectors of precise length and given values
vector_2 = [1,100,2,100,3,100,4]; numVal = 19; your_vec = repmat(vector_2,1,ceil(numVal/numel(vector_2))); your_vec =...

circa 12 anni fa | 1

| accettato

Risposto
HOW CAN I RE-EDIT MATRIX?
your_mat = cell2mat(arrayfun(@(n) repmat(a(n,[1 3]),a(n,2),1),(1:size(a,1))','uniformoutput',false));

circa 12 anni fa | 1

| accettato

Risposto
What is the maximum number of variables for practical use of fminsearch?
The Nealder-Mead algorithm is meant to be used for low-dimensionality problems. _fminsearch_ uses it. Please see: [1] Laga...

circa 12 anni fa | 1

| accettato

Risposto
How to merge cells together?
Two alternatives, since I am not exactly sure what you want. a = num2cell(randi(10,10,10)); your_mat = cell2mat(a); ...

circa 12 anni fa | 0

| accettato

Risposto
I need to manipulate this matrix
B = reshape(A',1,[]); Alternatively: B = A'; B = B(:);

oltre 12 anni fa | 0

| accettato

Risposto
To order min to max value for matrix's row
sortrows(sort(a,2))

oltre 12 anni fa | 0

| accettato

Risposto
intersection between three circles
If you have the mapping toolbox, then _circcirc()_ works for two circles at a time (in your case you would have to test the thre...

oltre 12 anni fa | 0

Risposto
Problems with rand() when tossing coin
Simplifying your code a bit: vals = rand(1000,1)>0.5; ratio = sum(vals)/sum(~vals); What makes you thing the results a...

oltre 12 anni fa | 0

Risposto
remove values of a matrix from another
A = A(~ismember(A,B))

oltre 12 anni fa | 1

| accettato

Risposto
fscanf returns an empty array
doc memmapfile

oltre 12 anni fa | 0

| accettato

Risposto
how to control and access which variables are considerent at each iteration in ga optimization?
I might be mistaken, but that's not how I would go about doing sensitivity analysis. It sounds to me that all you'd be achieving...

oltre 12 anni fa | 0

Risposto
Write a function for calculate value
doc min doc max doc mean doc varargin

oltre 12 anni fa | 0

Risposto
Mean and median (difference)
With only two values, there is no difference. If the values come from a normal distribution, there is no difference. If th...

oltre 12 anni fa | 0

| accettato

Risposto
How to calculate mean wind direction
average = mod(sum(data),360)./numel(data) Please accept an answer if it helped you.

oltre 12 anni fa | 1

| accettato

Risposto
sum first and last number of array
To give you a hint: a = randi(10,10,1); your_mat = sum([a flipud(a)],2); Modify to fit your criteria. Please accept...

oltre 12 anni fa | 1

Risposto
Find the first position of maximum value in a Matrix
[maxValue, linearIndexesOfMaxes] = max(A(:)); [rowsOfMaxes colsOfMaxes] = find(A == maxValue,1,'first') Please accept an...

oltre 12 anni fa | 1

| accettato

Risposto
Splitting array into two
s1 = x(1:half); s2 = x(half + 1 : end); Indexing starts at one in Matlab. Please accept an answer if it helped you.

oltre 12 anni fa | 5

| accettato

Risposto
how to draw 3 2D plots concurrently with their 3D plot in the same image
You could use _plot3()_ and consecutively set one of the coordinates as a constant. data = repmat((1:10)',1,3); plot3(...

oltre 12 anni fa | 1

| accettato

Risposto
x = 0:0.1:10... What's going on, really?
Well, just look at how _linspace_ is implemented: edit linspace It might explain some of the behavior you see. On an addi...

oltre 12 anni fa | 0

| accettato

Risposto
What is the best way to execute 2 if conditions in MATLAB
for ii = 1:numel(w) if (w(ii) == 1) %stuff else if (q(ii) == 1) %stuff else ...

oltre 12 anni fa | 0

| accettato

Risposto
columns, none under 5.
One of many, many possible ways: a = [1 0 0 1 1 0 2 0 2 0 3 3 4 1 4 0 7 1 7 2 ... 9 1 6 3 7 2 10 1 10 3 8 1 10 6 13 ...

oltre 12 anni fa | 0

| accettato

Carica altro