Answered
how can i fix this error "Subscript indices must either be real positive integers or logicals".in the following program?
Your problem presumably occurs at the line ed=e2(...) + e1(...); If you intended e2 and e1 to be vectors, which is how ma...

13 years ago | 0

Answered
Integration in Matlab for calculating if two distributions are significantly different
First, it should be noted that you are making the fundamental assumption that your two probability distributions are independent...

13 years ago | 0

| accepted

Answered
Finding overlap between multiple circles
If ImageAnalyst's assumption is correct that you only want to find the area of overlap between pairs of circles, one from each m...

13 years ago | 0

Answered
Having problems with function theta = acosfull(x,y) command
In your code as it stands the variable 'r' is never defined, but matlab is asked to make computations with it. No wonder it get...

13 years ago | 0

Answered
plot an ellipsoid with matlab
It depends on whether R or T is to be performed first. I will assume you want to first rotate by multiplying by the 3 x 3 matrix...

13 years ago | 1

Answered
plot an ellipsoid with matlab
Your second ellipsoid's equation can be rewritten in the form: x^2/a^2 + y^2/b^2 + z^2/c^2 = 1 where a, b, and c are defi...

13 years ago | 2

Answered
Vector in a piecewise function
The "if-elseif-etc" construct you have there doesn't work the way you want for vectors. For example if you say "if t<8", for t ...

13 years ago | 1

| accepted

Answered
normal distribution from data
You might try the Statistics Toolbox function 'normplot' to see how closely your 'data' comes to a normal distribution.

13 years ago | 0

Answered
Should the mean for the randn function converges to zero with increasing the sample size?
The experiment you have conducted is not a statistically valid test for observing the scatter of a sum of gaussian random variab...

13 years ago | 2

Answered
first time using matlab, how can i use solve to find the equilibrium solutions of the differential equation, y` = -( 3 - y ) y
Why bother using matlab when elementary differential equations techniques will easily give the solution: y = 3/(1+k*exp(3*x)...

13 years ago | 0

Answered
How to find normal distribution probability using mean and standard deviation?
normcdf(1,0,0.25) - normcdf(-1,0,0.25)

13 years ago | 3

| accepted

Answered
How to plot an Ellipse
Let (x1,y1) and (x2,y2) be the coordinates of the two vertices of the ellipse's major axis, and let e be its eccentricity. a =...

13 years ago | 9

| accepted

Answered
controlling array data when calculating
w = -a:(a/1000.5):a;

13 years ago | 0

Answered
Question regards making a function in matlab involve matrices
Let M be your 7 x 4 matrix of 1's and 0's. [m,n] = size(M); p = ceil(m*rand(1,n)) + m*(0:n-1); M(p) = 1-M(p);

13 years ago | 0

Answered
function discrete Time-integrate with a variable
For functions which are only known at discrete points, use matlab's 'trapz' function.

13 years ago | 0

Answered
Format longeng - rounding error
Whatever your matlab version and whatever your operating system, you are attempting to do decimal arithmetic on a machine that u...

13 years ago | 0

| accepted

Answered
Find a series of consecutive numbers in a vector
Yet another method. Let t be your timestamp row vector. N = 5; % Required number of consecutive numbers following a first o...

13 years ago | 7

| accepted

Answered
Plot to a central point?
n = length(xcoords); px(1:2:2*n-1) = xcoords; px(2:2:2*n-2); = xcenter; py(1:2:2*n-1) = ycoords; py(2:2:2*n-2); = ycent...

13 years ago | 1

| accepted

Answered
Error in Poisson's distribution.
As you have written it, 'paramEsts' will be a single scalar consisting of the maximum likelihood estimate of the Poisson paramet...

13 years ago | 0

| accepted

Answered
Numerical integration of a 2d field with integration over parameters
If your triple integral is intended to be the volume integral over the defined limits of cylindrical coordinates, r, phi, and z,...

13 years ago | 0

Answered
MATLAB help (finding all the possible values for x)?
Another approach is to expand both cosines in terms of cos(.6*x) which gives a cubic equation in the quantity. Any of its roots...

13 years ago | 0

Answered
How can I draw a tangent line from a given point to a circle in Matlab
Let P1 be a 1 x 2 row vector of the external point's cartesian coordinates and P2 a similar vector of the circle's center coordi...

13 years ago | 1

| accepted

Answered
Vector programming of sum (greek sigma)
It looks as though this is what was meant: %method two timer2 = tic; the_sum2 = sum(sum(A,2),1); toc(timer2);

13 years ago | 0

| accepted

Answered
Can Mathlab solve this
It is useful to know how to solve such equations by hand rather than always depending on matlab. The trick is to eliminate eith...

13 years ago | 0

Answered
Integration in m file
Yes, I think you did misinterpret it. The question asks for the area "confined by the functions f(x)=x+3 and g(x)=tan(x)", not ...

13 years ago | 0

Answered
convolution of two functions
I was hoping 'int' would solve this for you. Shame on 'int'! Oh well, assisted by my own ancient symbolic toolbox, I have hand...

13 years ago | 0

Answered
convolution of two functions
This is hopefully a problem that the symbolic toolbox's 'int' function could solve for you. The convolution of the two function...

13 years ago | 1

Answered
"Work around" for using an index with decimal entries
If by "decimal" you mean fractions such as 15.30, then no, matlab uses only positive integers for its indices. That is an absol...

13 years ago | 0

Answered
Composition of Functions and Sequence
For problem 1.2 I strongly recommend reading up on the definition of function composition. For example: http://en.wikipedia...

13 years ago | 0

Answered
getting the error :Error using ' Transpose on ND array is not defined.:', in the following codelines..pls help.
Apparently the array img has more than two dimensions, so writing its transpose is not well-defined. I would guess its third di...

13 years ago | 0

| accepted

Load more