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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 1

| akzeptiert

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

mehr als 11 Jahre vor | 1

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

mehr als 11 Jahre vor | 3

| akzeptiert

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 1

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

mehr als 11 Jahre vor | 1

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 1

| akzeptiert

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

mehr als 11 Jahre vor | 1

| akzeptiert

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

fast 12 Jahre vor | 1

| akzeptiert

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

fast 12 Jahre vor | 0

| akzeptiert

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

fast 12 Jahre vor | 0

| akzeptiert

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

fast 12 Jahre vor | 0

| akzeptiert

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 1

| akzeptiert

Beantwortet
fscanf returns an empty array
doc memmapfile

fast 12 Jahre vor | 0

| akzeptiert

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 0

| akzeptiert

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

fast 12 Jahre vor | 1

| akzeptiert

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

fast 12 Jahre vor | 1

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

fast 12 Jahre vor | 1

| akzeptiert

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

fast 12 Jahre vor | 5

| akzeptiert

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

fast 12 Jahre vor | 1

| akzeptiert

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

fast 12 Jahre vor | 0

| akzeptiert

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

fast 12 Jahre vor | 0

| akzeptiert

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

fast 12 Jahre vor | 0

| akzeptiert

Mehr laden