Answered
Connected Component labeling without using bwlabel or bwconncomp functions ?
A is not a binary image, but a gray scale image with values ranging from 0 to 255. If you use imhist(A) to view the data, you se...

11 years ago | 0

| accepted

Answered
how to save multidimensional structures into .mat file
B.data = A.data; B.event = A.event; save('data.mat', 'B');

11 years ago | 0

| accepted

Answered
mix two matrices to create new one
A = rand(10,1); B = 10*rand(10,1); C = repmat(A, 1, 10); C(1:11:10*10) = B; Ci is then C(:,i).

11 years ago | 1

Answered
Line Style Specifiers used with Color Specifiers
plot(x,y, '--', 'Color',[0,0.8,0.9]); or plot(x,y, 'LineStyle', '--', 'Color',[0,0.8,0.9]);

11 years ago | 0

| accepted

Answered
matlab code to calculate Canberra distance
sum(abs(p - q)./(abs(p) + abs(q)))

11 years ago | 1

Answered
problem for loop matrix
I have no experience with the cadf function. But it seems that the value of tmp.adf is not the one you need. Check the cadf func...

11 years ago | 0

Answered
How can I graph multiple loops on one graph?
p = 50; n = 5; b = [0.5 0.9 1.1 1.5]; t = 1:n; for i = t x(i,:) = p*(b.^i); end plot(t,x, '-o') ...

11 years ago | 0

| accepted

Answered
how to find max and min value from .mat file and save it to an other array?
S = load('j.mat', 'j'); minmax = [min(S.j) max(S.j)]; save('jminmax.mat', minmax);

11 years ago | 0

| accepted

Answered
Linear combination matrix columns
This can be solved similar to your other question <http://www.mathworks.com/matlabcentral/answers/244426-linear-combination-matr...

11 years ago | 0

Answered
How to delete rows that contains negative elements of a matrix, using for loop?
The problems may be because you change the matrix and delete row i while inside the for loop Instead of the for loops you can...

11 years ago | 1

Answered
How can I solve this odd/even loop question (hailstone sequence)?
First you can skip the 1, and just write n(ii). Next you have forgotten to assign the new value, and you have to move the inc...

11 years ago | 1

Answered
Find unique rows comparing 2 colums?
unique(a(:, 2:end), 'rows')

11 years ago | 0

| accepted

Answered
How can i get rid of error message'undefined varable'
You can compute the maximum across the rows using max(M, [], 2) and the global maximum using max(M(:))

11 years ago | 0

Answered
how to import .mat file in excel?
There are several worksarounds to do that, as explained in <http://www.mathworks.com/matlabcentral/answers/94104-how-can-i-d...

11 years ago | 0

| accepted

Answered
linear combination matrix columns
C = [1 5 6; 2 7 6; 3 2 2]'; ind = nchoosek(1:3, 2) for i = 1:size(ind) cov(C(:, ind(i,:))) end

11 years ago | 1

| accepted

Answered
Search value that is nearest to the multiple of a specific value
dist2 = 0.1:0.1:max(dist); for i = 1:numel(dist2), [~, ind(i)] = min(abs(dist - dist2(i))); end height2 = height(ind);

11 years ago | 0

Answered
Write value to excel
You should compute the mean gray values of all images in the for loop as follows B2(i) = mean2(I1); B3(i) = mean2(I2); ...

11 years ago | 1

| accepted

Answered
how to delete outliers?
Replace & with OR (|); eingabe cannot be smaller mu AND (&) larger mu at the same time: outliers = eingabe{n,m} < mu - 2*s |...

11 years ago | 0

| accepted

Answered
How i can input values from user in array
>> x = input('Please enter Matlab matrix> ') Please enter Matlab matrix> [2 3 4; 5 6 7] x = 2 3...

11 years ago | 2

Answered
How can i write condition "x is not less then zero" in while loop
while x >= 0

11 years ago | 1

| accepted

Answered
Specify limits to a plane's dimension, depending on data dimensions, so it exactly overlaps data
Determine the minimum and maximum values of your data and then use patch to draw a plane below the data.

11 years ago | 0

Answered
Storing elments of marix from text file into variables
Based on Jan's solution, I wrote the following function that does the job: function [x y data] = readxydata(filename) fi...

11 years ago | 0

Answered
Unable to use the nanmean function
nanmean is part of the Statistics toolbox.

11 years ago | 0

Answered
Using the Plot function with a text string
eval(['plot(' e ')'] Note that you could get the whole work done in two lines e = sprintf('handles.s,handles.Data_Inpu...

11 years ago | 0

| accepted

Answered
Summarize data in a table
If C is a years x crews matrix of salaries, you get the sum of the crews' salaries for each year as sum(C, 2) Same for t...

11 years ago | 0

Answered
How to get average of the image?
If you have a grayscale image I you can compute the man across all rows (i.e., horizontal cross-sections of the image) using ...

11 years ago | 0

Answered
HOW to show textfile as an image in matlab?
Use imwrite.

11 years ago | 0

Answered
Why the other value are not getting incremented in an array?
The error is due to the if-clause if (j>i||j~=i) which is equivalent to if j~=i which is true also if j<=i, and i...

11 years ago | 0

Answered
how to perform ANOVA on a matrix
If you have the Statistics toolbox, check out multcompare

11 years ago | 0

Answered
Extract certain value from a string
fid = fopen('FileName.txt'); D = textscan(fid, '%f %f%% %s', 'Headerlines', 1); fclose(fid) value = D{2}(2);

11 years ago | 0

Load more