A répondu
How to program a no periodic impulse train
intervals = [3,4,3]; hits = [1000,500,40]; result = cell(1,3); cnt = 0; beginning = 0; for ii = [cumsum(int...

plus de 6 ans il y a | 0

| A accepté

A répondu
How to split a vector in to sub vectors?
v = rand(8812,1); n = 20; dummy = nan(20,ceil(numel(v)./n)); dummy(1:numel(v)) = v; result = nanmedian(dummy)

plus de 6 ans il y a | 2

A répondu
Remove values from cell array based on condition
A= {[2,3,4,5,6]; [1,3,4,5,6,7,8] } B= {NaN, 1,1,-0.9,0.8,[],[]; NaN, NaN, 0.9,-1,NaN,0.8,0.2} result = cell(size(A)); ...

plus de 6 ans il y a | 1

A répondu
How to extract and convert mat from cell using for loop?
data = {rand(10,1),rand(20,11)}; for ii = 1:numel(data) result = data{ii}; %result is the extracted data end ...

plus de 6 ans il y a | 0

A répondu
Matrix call inside a for loop
data = {a1,a2,a4,a4}; %Better yet, use a cell array from start result = cell(size(data)); for ii = 1:numel(data) ...

plus de 6 ans il y a | 0

A répondu
Make two matrices of same length reducing the size of largest matrix
result = {A,B} minDim = min(cellfun(@numel,result)); result = cellfun(@(x) {x(1:minDim)}, result);

plus de 6 ans il y a | 0

A répondu
compare between two unequal vectors
A = [2,3,4,5,6]; B = [2,3,4,6]; dummy = bsxfun(@eq, A',B) dummier = ismember(A,B)

plus de 6 ans il y a | 0

| A accepté

A répondu
How do I visually represent points on a graph?
scatter(x,y,60,change,'filled'); colormap('jet');

plus de 6 ans il y a | 0

| A accepté

A répondu
Performing matrix subtraction for huge data
The problem is not _bsxfun_, it is the sheer amount of data: dataSize = 230600 * 1400000 * 8 (size of a double in bytes) m...

plus de 6 ans il y a | 1

A répondu
How to set bar beginning value?
aH = axes; minimum = rand(10,3); maximum = rand(10,3) + minimum; bH = bar(maximum); hold on; bH1 = bar(mini...

plus de 6 ans il y a | 2

| A accepté

A répondu
how can i place 25 image by using in one mask in successive manner?
This is how I interpret your question. imageSize = [256,256]; numImages = 25; result = zeros(numImages,imageSize(...

plus de 6 ans il y a | 0

| A accepté

A répondu
Reading large data set from text file & separating to individual column
Read in your data and then: dummy = '1950/05/21 04:00:00 1.7100 1 1'; result = regexprep(dummy,'[\s/:]+',' ') ...

plus de 6 ans il y a | 0

| A accepté

A répondu
How to make a valid array for boxplots?
Provided an act of God, this might work: boxplot(cell2mat(c3));

plus de 6 ans il y a | 0

A répondu
Index exceeds matrix dimensions.
Type dbstop if error in the command line. Run your code. Look at the size of the variables in the operation that fail...

plus de 6 ans il y a | 1

A répondu
cumsum reset back to zero every 100 times
I interpreted _"reset cumsum to zero"_ as restart cumsum from scratch. data = rand(1,601); dummy = zeros(100,ceil(size(dat...

plus de 6 ans il y a | 2

| A accepté

A répondu
Averaging sequential data if values are the same?
key_column = [-6 -6 -6 -6 -5 -5 -3 -3 -3 -1 -1 -1 0 0 1 1 2 2 2 3 3 5 5 5 5 6 6 6 6 4 4 4 3 3 3 3 3 3 3 2 2 2 1 1 1 1 0 0 -1 ...

plus de 6 ans il y a | 0

A répondu
Convert a table to an Excel file using Tofile
Are you sure that all the variables in your .mat file are valid for _xlswrite()_? From the documentation data.f{k}, should be...

plus de 6 ans il y a | 0

A répondu
Set Colorbar TickLabels and TickMarks
plot(rand(10,1)) cH = colorbar; cH.TickLabelInterpreter = 'tex'; idx = 955; for ii = 1:numel(cH.TickLabels) ...

plus de 6 ans il y a | 2

A répondu
please solve problem index increase matrix dimension.
Both _NumberOfNodes_ and _Etotal_DBR_ are scalars and it seems that you want to treat them as arrays and actually do some indexi...

plus de 6 ans il y a | 0

A répondu
Create array with same number
twos = 2.* ones(length(x),1)

plus de 6 ans il y a | 19

A répondu
greek symbols in disp command
disp('θ') works fine for me.

plus de 6 ans il y a | 0

| A accepté

A répondu
Formatting quiver() arrows
If you wanna go kosher: data = rand(10,4); qH = quiver(data(:,1),data(:,2),data(:,3),data(:,4),0); hold on qH1 = qui...

plus de 6 ans il y a | 0

A répondu
Convert plotted graph to (x,y) coordinates?
It ain't pretty but it works. As far as I understand there are no simple options you can set to get the look you want. data ...

plus de 6 ans il y a | 0

A répondu
putting an exception in the plot command
You could use _setdiff()_ to do the indexing: data = rand(10,20); plot(data(:,setdiff(1:20,5:7))); Please accept the a...

plus de 6 ans il y a | 1

| A accepté

A répondu
plotting multiple graphs in different colors with a single command
plot(distance_from_herder(1:length,1:11)); Please read the documentation.

plus de 6 ans il y a | 0

A répondu
How can I access the Axle property in an axis ruler?
If you want to make the x-axis disappear: ax.XAxis.Color = 'None';

plus de 6 ans il y a | 1

| A accepté

A répondu
How to used 'griddedinterpolant' command in for loop?
data = rand(10,10,100) for ii=1:100 subset = data(:,:,ii); %Copy probably unnecessary, left for clarity do_your_t...

plus de 6 ans il y a | 1

| A accepté

A répondu
Using the Save command to save a logical mask
data = handles.mask; save('someFile.mat','data');

plus de 6 ans il y a | 1

A répondu
Unit of the MarkerSize in a 3D plot?
Doesn't matter if your plot is 3D, it is still rendered on a 2D plane. <http://printwiki.org/Point_Size>

plus de 6 ans il y a | 0

| A accepté

A répondu
Is it possible to connect points on a scatter plot with arrows instead of a line?
x = rand(10,1); y = rand(10,1); dx = diff(x); dy = diff(y) plot(x,...

plus de 6 ans il y a | 0

Charger plus