Answered
Anyone know the algorithum of bwconncomp/bwlabel ?/Coding problem
In a BW image, I would first find the boundaries, using shifts. Then do systematic marching along the boundaries, as in, start f...

11 years ago | 0

Answered
Get new variable if a condition verifies in a cell
First eliminate any rows that are not 2010, 2009 or 2008. I am assuming here that 2010 is the latest year so: check1=nnz(A(:...

11 years ago | 1

| accepted

Answered
How can I measure how many pixels a single irregular object has?
I assume the sea of blue there are all 0s, so I would do image(image~=0)=1, and you will have a black and white image of only 1s...

11 years ago | 0

Answered
Changing variable names based on a string
Use _eval_ alongside _strcat_ and _num2str_.

11 years ago | 1

Answered
A simple matrix operation
BB=repmat(B,[n 1]); C=A./BB;

11 years ago | 1

Answered
Calculate how often a 1 turns into a 0 or 1, and vice versa
check1=(a+circshift(a,[-1 0])); check2=(a-circshift(a,[-1 0])); check1==0 % is 0's followed by 0's check1==2 % is 1's f...

11 years ago | 1

Answered
Image reconstruction from edge information
Your problem if I understand correctly, is in fact solvable. I don't think you communicated the fact that the image is binary ef...

11 years ago | 0

Answered
How to shuffle some arrays of a matrix?
p = randperm(n)

11 years ago | 0

Answered
Bi-linear Regression- Model fitting
That sounds like a problem that would be better solved with a clustering or classification tool rather than regression. If you r...

11 years ago | 0

Answered
How I can to rename a variable in loop for?
There is an ugly way to do this using the _eval_ function. Something like: for i=1:12:t eval(strcat('moist_',mes(o),...

11 years ago | 0

Answered
find an equation for the set of coordinates
I would use cftool, easier to play around with different fits, and not confined to polynomials.

11 years ago | 0

Answered
Adding all possible combinations of array elements
Use combnk to get the the unique combinations over a,b,c and d. For each of those combinations, use base math to get the repetit...

11 years ago | 0

Answered
Anyone has bwconncomp source code? Or its algorithm
C:\Program Files\MATLAB\R2013b\toolbox\images\images\private is a good place to start. You might have to chase a lot of depen...

11 years ago | 0

Answered
Extract (splined) function from two vectors
This might sound like a simple-minded suggestion, if you are looking for a function "slightly below" the one you drew, why not j...

11 years ago | 0

Answered
How to extend the fitting curve in command
All you need to do is calculate Y axis for that entire range using the fit you calculated. Pass x=0:1:1400 through f(x), then pl...

11 years ago | 0

| accepted

Answered
How to eliminate the rows with replication?
C = unique(A,'rows')

11 years ago | 0

| accepted

Answered
Efficient alternative to bwconncomp?
Have you tried using the circular Hough transform? I am not sure if it would be faster, but should be worth a try.

11 years ago | 0

Answered
Polynomial arrays intersection and area within intersection
help polyval And the rest is your homework. Good luck.

11 years ago | 1

Answered
How can I change Axis properties in cftool?
I was able to do this easily using file->print to figure, then changing the scale as in any other figure. Also, make sure you do...

11 years ago | 0

Answered
Crossvalidation of liinear models?
This depends on how you would like to do the cross validation. Leave-one-out cross validation has a nice trick for linear models...

11 years ago | 1

Answered
Max()-function and multiple dimensions
Do: [C I]=max(x(:)); now C is the maximum value, I is the index of where it is, so that x(I) is C. If you want the 5...

11 years ago | 3

| accepted

Answered
Solve Poisson Problem with Finite Difference using parallelization
Poisson equation boils down to a simple Ax=b problem. If you have the parallel computing toolbox, using mldivide (or the plain \...

11 years ago | 1

Answered
Two dimensional projections of a three dimensional curve
This is not a very clear question. If you are just interested in 3 2D projections of a 3D object, all you have to do is plot x&y...

11 years ago | 0

| accepted

Answered
How to export 3d surface plot figure(matlab figure) to xhtml?
Check out plot.ly, very nice interactive plotting tool for MATLAB. https://plot.ly/matlab/

11 years ago | 0

Answered
how can I find the cell no: of the minimum value in a m*n*x matrix
index=find(A==min(A(:))); Then A(index) will give you the minimum value. If you need the explicit 3D index checkout the func...

11 years ago | 0

Answered
Principle Component Analysis (PCA) bi-plot vector magnitude
I am not sure how princomp works, but here is a quick way to do this. 1) mean center your data, meaning subtract the mean acr...

11 years ago | 1

| accepted

Answered
How to plot the contour of a circle, when the data are stored as vectors from the origin.
Your values are in polar form. You can contour plot them in a cartesian frame as x-axis=r and y-axis=angle in which case you wou...

11 years ago | 0

| accepted

Answered
Efficient way of reading cell arrays
This really doesn't make much sense without context to me. This is an incredibly inefficient data storage configuration. From wh...

11 years ago | 0

Answered
sum of an array and checking condition
checksum = 0; I=0; while checksum<=limit I=I+1; checksum=checksum+yourarray(I); end

11 years ago | 0

Answered
how can I solve a over deterministic system with least square method?
Check the function regress if you have the statistics toolbox. If you don't have the toolbox, you can use a variety of functi...

11 years ago | 0

Load more