Réponse apportée
Extract numeric year from string
datestr = date; year = str2num(datestr(end-3:end));

environ 11 ans il y a | 2

Réponse apportée
Ability to add two variable on separate lines into a title
title({'Peaks', int2str(2015)})

environ 11 ans il y a | 0

Réponse apportée
How to graph a Piecewise function?
%Theta= 0:(2*pi)/100:2*pi; %the vector lists 100 elemants between 0 and 2Pi % Actually these are 101 elements; % use ...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
How do I plot a ROC graph of True Positive vs. False Negative?
The idea of ROC analysis is to have find TP and FP for different, say, 100 thresholds, and then plot(FP, TP) where FP a...

environ 11 ans il y a | 0

Réponse apportée
How to merge two different size matrix logically?
Like this? A = [0, 1, 2, 3, 4, 5, 7, 10]; B = [2, 5, 7]; C(:,1) = A; C(end,2) = 0; % ind = arrayfun(@(x...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
Changing function logic parameters depending on outputs
You can use the istilde from http://biorobots.cwru.edu/personnel/adh/stackoverflow/04/ with the caveat that it works just in fu...

environ 11 ans il y a | 1

| A accepté

Réponse apportée
Using strepp on a textfile with replacement from array.
A sketch how you could proceed: 1. Read the EXCEL file with xlsread 2. Create long array of char with the desired informat...

environ 11 ans il y a | 1

| A accepté

Réponse apportée
how to choose right index
Y = Y(sum(idx, 2) ~= 2, :); plot(Y(:,1), Y(:,2), '.r')

environ 11 ans il y a | 0

Réponse apportée
How can I resize the matrix?
B = A(sum(A') ~= 0, :)

environ 11 ans il y a | 0

| A accepté

Réponse apportée
Adding element within vector without overwriting the existing value
X = {'asdf' 'foo' 'bar'}; n = 3; name = 'foooo'; X = {X{1:n-1} name X{n:end}};

environ 11 ans il y a | 0

Réponse apportée
Index of matrices in a for loop
You compute a 3x3xN matrix where N is are the values of theta as follows QN(1,1,:) = Q11*cos(theta).^4+(2*(Q12+2*Q66))*sin(t...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
Is it possible to call a subfunction inside a function mscript?
No. You have to create a separate mfile that can be called by your mscript.

environ 11 ans il y a | 1

| A accepté

Réponse apportée
Adjusting plot fill to show two colours depending on overestima​tion/under​estimation
Have a look at http://www.mathworks.com/matlabcentral/fileexchange/34876--greater-than--fill or my solution that does need n...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
choose elements from array
To compute a cellarray 'combinations' with all 2^N possible combinations of elements, you can use: val = 1:3; N = numel(...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
Set new position for x label at semilogx diagram
semilogx(Tr(2:end),SSa,'g*-') hold on semilogx(Tr(2:end),SSb,'b*-') semilogx(Tr(2:end),SSc,'r*-') set(gca, 'XTick'...

environ 11 ans il y a | 0

Réponse apportée
how can i find t closest image in many images?
Well, there is lots of research devoted to this question. One simple way would be to compute the RMS (root mean squared) differe...

environ 11 ans il y a | 0

Réponse apportée
How to read datafiles residing in a different path than the program using the 'load' command or otherwise?
srcdir = 'F:/TP/Data/day' for i = 1:10 fullfilename = [srcdir filesep 'datafile_' int2str(i) '.dat']; %...

environ 11 ans il y a | 0

Réponse apportée
Speeding up matrix multiplication and inversion
If the matrices are sparse, coding them as such using Msparse = sparse(M); may help.

environ 11 ans il y a | 0

Réponse apportée
finding number of pixels inside each circle
A well-known "approximation" is :-) N = round(radius^2*pi) You could also create a circle and count the pixels: rad...

environ 11 ans il y a | 1

Réponse apportée
Matlab help. How to add a file into matlab?
The quick way is to find out current directory (the Present Working Directory) pwd and copy the file to this folder. ...

environ 11 ans il y a | 3

| A accepté

Réponse apportée
mapping of matrices with different size
Stephen made some remarks that are useful in general, but in your case you can get along with newdata(:,1) = 0:0.1:1; % fir...

environ 11 ans il y a | 0

Réponse apportée
How to extract residuals from a best fit
The is no space between adjust and the following number in your Locator Repeatability 131 No Coolant.txt file, resulting in Adju...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
Finding the value of a line when it falls past a certain value on the y axis
First, don't use "length" as a variable, it's a function in Matlab. I used L instead. In general there will be no value in L ...

environ 11 ans il y a | 0

Réponse apportée
plot smooth curve through discreet points
First you have to interpolate x depending on y. Next, you have to do the interpolation separately for each of the discontinuous ...

environ 11 ans il y a | 1

| A accepté

Réponse apportée
How to use negative numbers in MatLab
Use grades(grades < - 1.5) = -3;

environ 11 ans il y a | 1

Réponse apportée
How to concatenate string vectors of unequal length?
v1 = {'a' 'b' 'c'}'; v2 = {'d'}'; v3 = {'e' 'f'}'; m = max([numel(v1) numel(v2) numel(v3)]); if numel(v1) < m, v1{m} =...

plus de 11 ans il y a | 1

Réponse apportée
Can I restore the original matrix back from its gray scale image?
If you have normalized the values there is no way back to the original values, because if a matrix M results in image I when nor...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
determining number of inputs
N = ('How many times?'); for i=1:N a(i) = ('your input'); end

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
integration of FFT
The is no such function as int in Matlab. What is int supposed to do?

plus de 11 ans il y a | 1

Réponse apportée
Superimpose matrices of different sizes
This works only if A and B have the same number of rows: ind = find(B>0); C = A; C(ind) = B(ind);

plus de 11 ans il y a | 0

Charger plus