Beantwortet
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...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

etwa 11 Jahre vor | 2

Beantwortet
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/...

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
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...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 11 Jahre vor | 0

Beantwortet
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 ...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 11 Jahre vor | 0

Beantwortet
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...

etwa 11 Jahre vor | 2

| akzeptiert

Beantwortet
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...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 11 Jahre vor | 0

Beantwortet
How to use filled circles (dots) instead of empty circles in scatter plots?
scatter(rand(1,10), rand(1,10), 'o', 'MarkerFaceColor', 'b')

etwa 11 Jahre vor | 5

Beantwortet
Can anybody help me the function adjcontrast() ?
h = imshow(yourimage); imcontrast(h)

etwa 11 Jahre vor | 0

| akzeptiert

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

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
Extract a matrix out of another matrix with logiccal expression
F(F(:,1) >= 5, :);

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
Converting values to 0 and 1 and then counting occurrences!
A(A<20) = 0; A(A>0) = 1; cnt = sum(diff(A) == -1);

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
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)

etwa 11 Jahre vor | 1

Beantwortet
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

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
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; ...

etwa 11 Jahre vor | 0

| akzeptiert

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

etwa 11 Jahre vor | 1

Beantwortet
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...

etwa 11 Jahre vor | 0

Beantwortet
How to perform a ttest assuming all values together?
You have to use anova1 if you have more than two samples.

mehr als 11 Jahre vor | 0

Beantwortet
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 ...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
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

mehr als 11 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 11 Jahre vor | 0

Beantwortet
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...

mehr als 11 Jahre vor | 0

Mehr laden