Réponse apportée
How to build a matrix like this
n = 4; result = repmat((n:-1:1),n,1) - tril(cumsum(tril(ones(n)))-1)

plus de 7 ans il y a | 1

Réponse apportée
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 7 ans il y a | 0

| A accepté

Réponse apportée
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 7 ans il y a | 2

Réponse apportée
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 7 ans il y a | 1

Réponse apportée
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 7 ans il y a | 0

Réponse apportée
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 7 ans il y a | 0

Réponse apportée
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 7 ans il y a | 0

Réponse apportée
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 7 ans il y a | 0

| A accepté

Réponse apportée
How do I visually represent points on a graph?
scatter(x,y,60,change,'filled'); colormap('jet');

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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 7 ans il y a | 1

Réponse apportée
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 7 ans il y a | 2

| A accepté

Réponse apportée
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 7 ans il y a | 0

| A accepté

Réponse apportée
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 7 ans il y a | 0

| A accepté

Réponse apportée
How to make a valid array for boxplots?
Provided an act of God, this might work: boxplot(cell2mat(c3));

plus de 7 ans il y a | 0

Réponse apportée
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 7 ans il y a | 1

Réponse apportée
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 7 ans il y a | 2

| A accepté

Réponse apportée
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 7 ans il y a | 0

Réponse apportée
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 7 ans il y a | 0

Réponse apportée
Set Colorbar TickLabels and TickMarks
plot(rand(10,1)) cH = colorbar; cH.TickLabelInterpreter = 'tex'; idx = 955; for ii = 1:numel(cH.TickLabels) ...

plus de 7 ans il y a | 2

Réponse apportée
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 7 ans il y a | 0

Réponse apportée
Create array with same number
twos = 2.* ones(length(x),1)

plus de 7 ans il y a | 19

Réponse apportée
greek symbols in disp command
disp('θ') works fine for me.

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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 7 ans il y a | 0

Réponse apportée
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 7 ans il y a | 0

Réponse apportée
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 7 ans il y a | 1

| A accepté

Réponse apportée
plotting multiple graphs in different colors with a single command
plot(distance_from_herder(1:length,1:11)); Please read the documentation.

plus de 7 ans il y a | 0

Réponse apportée
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 7 ans il y a | 1

| A accepté

Réponse apportée
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 7 ans il y a | 1

| A accepté

Réponse apportée
Using the Save command to save a logical mask
data = handles.mask; save('someFile.mat','data');

plus de 7 ans il y a | 1

Réponse apportée
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 7 ans il y a | 0

| A accepté

Charger plus