Réponse apportée
reducing an angle from 30 degree to 20 degree and increasing angle form 280 degree to 20
You can use my function angdiff to compute the angular difference. Note that the angles have to be given in rad; rad = deg/180*p...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
How to use MATLAB histogram & histcounts functions for Double Datatype
The error message says that there is no histcounts function. Histcounts and histogram were introduced in R2014b. Maybe you have ...

presque 11 ans il y a | 2

Réponse apportée
Eliminating for-loops (compact notation?)
Oh, that's easy (just kidding): X = squeeze(abs(log(mean(imageArray_1, 1)./mean(imageArray_2,1)*imageNormalisationDivisor_2/...

presque 11 ans il y a | 1

| A accepté

Réponse apportée
Problems in order to concatenate a string with file extension at filename parameter of imwrite
You can use name_3_P1.avi

presque 11 ans il y a | 0

Réponse apportée
how to make a funcation that return smallest posible integer from series
You forgot to handle the -1 case: function out = one_per_n(x) total = 0; found = 0; for n = 1:10000 total = tota...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
how to make a function that calculate consective difference of elements of a vector
Why not using your original solution with the changes that Yoav suggested, plus an additional abs() to get the _absolute_ differ...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
How to resize an image into size 256*256
Use r = size(J, 1); c = size(J, 2); If J is a color image, c returns the columns*3. See also my answer to your first qu...

presque 11 ans il y a | 0

Réponse apportée
special kind of interpolation
This "interpolation" is basically a plot with values added where y is zero: x = x(:)'; y = y(:)'; % force row vectors ind ...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
Solving Matrix Equations Using \
Because A has fewer rows than columns, the equation is underdetermined, that means that there is no unique solution, but multipl...

presque 11 ans il y a | 0

Réponse apportée
Conv two continuous time functions
The y-axis is too large to show the data. You can rescale them by, e.g., axis([1 8 -delta delta]) or with your code, use...

presque 11 ans il y a | 2

| A accepté

Réponse apportée
I want to create a curve on the histogram?
If you want to plot something on top of your histogram, use hold on plot(your arguments here) If you want to plot t...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
How to divide an image into blocks and find the RGB values of each pixels in a block?
To get the i,j 32x32 block from an RGB image, use BL = I((i-1)*32+[1:32], (j-1)*32+[1:32], 1:3); to select the R,G,B pla...

presque 11 ans il y a | 0

Réponse apportée
How to use filled circles (dots) instead of empty circles in scatter plots?
scatter(rand(1,10), rand(1,10), 'o', 'MarkerFaceColor', 'b')

presque 11 ans il y a | 5

Réponse apportée
Can anybody help me the function adjcontrast() ?
h = imshow(yourimage); imcontrast(h)

presque 11 ans il y a | 0

| A accepté

Réponse apportée
How to assign the data to the header with units in square bracket.?
What about header.data = 1:4; header.label = 'accel [m/s²]';

presque 11 ans il y a | 0

| A accepté

Réponse apportée
Plotting 1/x correctly
Because you have not specified the x values in your plot, they run from 1 to the numel(s). So X is not an absolute value but the...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
Extract a matrix out of another matrix with logiccal expression
F(F(:,1) >= 5, :);

presque 11 ans il y a | 0

| A accepté

Réponse apportée
Contour plot of Matrix
If you just have these 3x4 values, you can copy them to Matlab without reading the Excel file: A = [1 5 6 6 9 5 6 7 8...

presque 11 ans il y a | 1

| A accepté

Réponse apportée
Converting values to 0 and 1 and then counting occurrences!
A(A<20) = 0; A(A>0) = 1; cnt = sum(diff(A) == -1);

presque 11 ans il y a | 1

| A accepté

Réponse apportée
Create a vector with known indices and assign to that values from known vectors
var = [var1; var2; var3]'; ind = (positions - 1)*size(var, 1) + [1:numel(positions)]; final = var(ind)

presque 11 ans il y a | 1

Réponse apportée
how to do this Data analysis?
In the body of your for loop, write load(matFiles(k).name) plot(k, mean(C), '.') if k == 1, hold on, end

presque 11 ans il y a | 0

| A accepté

Réponse apportée
Smoothing plots in MATLAB
To generate a smoothed version xs of x, you can average over n elements, i.e., n = 3, with the following one-liner: n = 3; ...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
How to cut the end of a string which follows a special character?
regexp('sahdklsjf_sdfs', '(^[a-zA-Z]*)', 'match')

presque 11 ans il y a | 1

Réponse apportée
I need 25 different numbers between 1 and 34 which will select 25 different cases in a switch. Any help would be greatly appreciated.
r = randperm(34); % all number from 1 to 34 in random order r = r(1:25); % 25 different numbers between 1 and 34 You can t...

presque 11 ans il y a | 0

Réponse apportée
How to perform a ttest assuming all values together?
You have to use anova1 if you have more than two samples.

presque 11 ans il y a | 0

Réponse apportée
How can I find and replace a pattern inside a matrix
The is the morphological operation 'erode' on black-and-white images. If you have the image processing toolbox, you can use ...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
How can I plot multiple columns from multiple files using plot?
That's straightforward, given that D1 is your N*3 file plot(D1(:,1), D1(:,2:3)') hold on Load another data D2 plot...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
Using a For Loop with the variable set to a series defined matrix values?
Have you tried this combination of brackets? ;-) for window = {1:64, 30:31, 21:29} windowval = cell2mat(window); end

presque 11 ans il y a | 1

| A accepté

Réponse apportée
Old Version Matlab on Mac
You have to install XQuartz and Apple Java 6: http://www.mathworks.com/matlabcentral/answers/103598-why-am-i-unable-to-launch...

presque 11 ans il y a | 0

Réponse apportée
Generate a weighted graph and an adjacency matrix from an image matrix
If you have a image matrix like 10 3 4 12 5 8 you could interpret it as an adjacency matrix of a directed graph a...

presque 11 ans il y a | 0

Charger plus