Réponse apportée
How to produce a graph with 2 sets of data on matlab?
I deleted the final element of Temperature1, such that x, Temperature, and Temperature1 have the same number of elements: x ...

plus de 10 ans il y a | 0

Réponse apportée
Matrices with MathLAB..
You can get help on Matlab's functions using help rand or doc rand

plus de 10 ans il y a | 0

Réponse apportée
cannot find the error in my code
Basically your function is function out=random_rayleigh(x,y) % some code tota_samples=mean_noise_level/1.25*random_rayle...

plus de 10 ans il y a | 0

Réponse apportée
How to exit a loop if file not found
Use "exist" to check if the file exists: fdir=fullfile('D:\Documents\Research\MAM LUBNA\Images\BRATS-1 JPG'); for AT = 1:...

plus de 10 ans il y a | 1

Réponse apportée
Diagonal of a quadrilateral
Just get rid of the "DB =" function x=quadrilateral(AB,BC,CD,DA,AC) x=(DA*(BC)+AB*(CD))/AC; Alternatively, of course, ...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
listing/enumerating numbers
for val=1:4 iv{val} = interact(ismember(interact(:,1), val), 2); end

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Changing order of matrix and add values
A = [1 0 0 1 1 1 0 2 0 2 0 2 0 0 3 0 3 3]; To sort only the positive values, the zero values are set to Na...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Matlab read and write file in loop
csvfiles = dir('*.csv') filenames = {csvfiles.name} for fn = filenames fprintf(1,'Doing something with %s\n', char(fn))...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Newton's method in Matlab
Approximation of 1/a by x using a suitable starting value x = 0.1: a = 14; x = 0.1; while abs(x*a - 1) > eps, x = x*(2-a*x)...

plus de 10 ans il y a | 0

Réponse apportée
how can i retain rgb color to segmented image (binary)?
If the binary image B is 1 where the object is in image I, use O = I.*B; If the image has more layers than B, you can use...

plus de 10 ans il y a | 0

Réponse apportée
replacing entries in matrices
R(10,:) = [10, 10]; R(50,:) = [20, 20];

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
removing strings on several calls of function
You can globally define the vowels global vowels vowels= {'a', 'e', 'i','o','u'}; And use a function that works on th...

plus de 10 ans il y a | 0

Réponse apportée
A list file paths of the files in the folder
Suppose you can address 'yourfile.m' in Dir_name from the 2 step upward folder using 'foo/bar/yourfile.m'. Then you can create t...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
reverse indexing with conditions
To get numerical indices, use find idx = find(A < 5); You can also use logical indices, that are often faster: idx = ...

plus de 10 ans il y a | 1

Réponse apportée
Weighted regression line on scatter plot
Try <http://www.mathworks.com/matlabcentral/fileexchange/34352-weighted-and-unweighted-linear-fit>

plus de 10 ans il y a | 0

Réponse apportée
comparing two matrices satisfying two conditions.
[~, idx] = max(maxLoad); mtl = min(totalLoad([1:idx-1 idx+1:end]));

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
How to update a plot/graph?
subplot(1,2,1); plot(x, y); drawnow

plus de 10 ans il y a | 0

Réponse apportée
How can I select the 15 best and worst score in a data set with NaN-values in it?
You can store the labels in a cell string and then loop over this cell string. labels = {'TRIG', 'PAL', 'PAL_12'} for ...

plus de 10 ans il y a | 0

Réponse apportée
Changing values until a condition comes true
function groundgrid Es = 1; Estep = 1; % sample values such that the while loop is entered while Es <= Estep ...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Line each iteration when plotting in a for loop
Why not get rid of "hold on"?

plus de 10 ans il y a | 0

Réponse apportée
Problem with Gaussian fit to Data
gaussEqn = 'a*exp(-((x-b)/c).^2)+d'

plus de 10 ans il y a | 0

Réponse apportée
How to store the cell array elements into logical array?
As Stephen and Guillaume pointed out: To compare if single element j is member of the set mprset, use if ismember(j,mprse...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Why custom function in path are not found anymore?
The hint is the string % Has no license available when you type which. This tells you that the file is there, put that the...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
Boxplot - Size of the labels
h = boxplot(rand(40,2)) set(findobj(get(h(1), 'parent'), 'type', 'text'), 'fontsize', 30);

plus de 10 ans il y a | 1

Réponse apportée
How can I search a binary array inside other bigger binary array?
A = [1 0 0 1 0;0 0 0 0 0;0 1 0 1 0;0 0 0 0 0] B = [1 0;0 0] Embed A into a larger matrix of nans because nlfilter sets bou...

plus de 10 ans il y a | 2

| A accepté

Réponse apportée
calculation of time series.
diffdata = diff(ts.Data) difftime = ts.Time(1:end-1)+diff(ts.Time)/2; tsdiff = timeseries(diffdata, difftime)

plus de 10 ans il y a | 0

Réponse apportée
HELP ON PLOT LEGEND, ERROR APPEARED for the third run!!
Use handles: h(1) = subplot(1,2,1), plot(rand(10,3)) h(2)= subplot(1,2,2), plot(rand(10,3)) legend(h(1), {'measuremen...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Xticklabels remaining fixed when replotting with different x values
If you just want to change the size of the font, use set(gca, 'FontSize', 6); If you want to set different XTickLabels, ...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Summation column matrix using for loop
Show the number from 1 to 10 for i=1:10 i end Show the values of the first column of A for i=1:size(A,1) A...

plus de 10 ans il y a | 0

Charger plus