Answered
calculate the sum of the following geometric series when N = 1000 and r =1/2 I have searched here and in the "help" in Matlab, but i found nothing about the geometric series
If your geometric series is a, a*r, a*r^2, ..., a*r^N, then its sum is: s = a*(1-r^(N+1))/(1-r)

10 years ago | 0

| accepted

Answered
eig function missing eigenvector
When you have more than one eigenvector with the same eigenvalue, any linear combination of them will also be an eigenvector wit...

10 years ago | 2

Answered
Extract submatrix from matrix with particular indexing
AT = reshape(A,m*n,[]); C = reshape(AT((1:m*n).'+m*n*(B(:)-1)),m,n);

10 years ago | 1

Answered
compute the unit vector given the angle
If vector 'v' points in the desired direction, then do this to make it a unit vector: v = v/norm(v);

10 years ago | 1

Answered
How can I combine two matrix ?
e = reshape([reshape(repmat(e1,7,1),[],49);repmat(e2,1,7)],[],2*49);

10 years ago | 0

| accepted

Answered
Problem with Greater Than and addition?
You need to be aware that your computer does its computation in binary digits not decimal digits. Hence it cannot represent 255...

10 years ago | 2

| accepted

Answered
How to generate data based on uninvertible probability distribution function?
a. If your f(y) is meant to be the cumulative probability distribution over a y support from zero to infinity, it is backwards f...

10 years ago | 0

| accepted

Answered
create Non-uniform distribution
This should do it: x = rand; x = (x>1/3)+(x>5/6);

10 years ago | 2

| accepted

Answered
multiplying 2 matrices with difference sizes
A = M.'; A = (reshape((A(A~=0)),4,12).').*P; % The element-by-element product This of course depends on each row of M ...

10 years ago | 1

| accepted

Answered
plot each point whose coordinates are D(5,-4) E(0,8) F(-4,5)
It looks as if you are attempting to find the radius of the unique circle passing through the three points D, E, and F. If ...

10 years ago | 1

| accepted

Answered
Generating random points within a solid from 3D CAD model.
Let an x,y,z coordinate system be located with the origin on, and the z-axis along, the central axis of your vase. Let R be a s...

10 years ago | 0

Answered
How to calculate the ZNCC threshold?
This paper gives a method of computation: http://vision.deis.unibo.it/fede/papers/iciar04.pdf As for choosing a thresho...

10 years ago | 0

Answered
How to solve implicit equations without the Symbolic Math Toolbox
The matlab function 'fzero', which I am sure you do have, and which is explained at: http://www.mathworks.com/help/matlab/...

10 years ago | 0

Answered
Investigate the qualitative behavior of a nonlinear system of differential equations
The matlab function 'ode45' is your friend. Read about it at: http://www.mathworks.com/help/matlab/ref/ode45.html

10 years ago | 0

Answered
how to solve a differential and nonlinear algebraic equation simultaneously.
I would suggest you solve the second equation for y(2), expressing it as a function of y(1). Then in the first equation substit...

10 years ago | 0

Answered
What's wrong with this integral?
You must define your integrand function so that it will accept a vector input. In this case that means put a dot in the multipl...

10 years ago | 0

Answered
Need help writing script using "if" "then" type arguments and loops to pull specific data from long data file
Rather than using 'if' constructs I think it would be better to use logical indexing, or perhaps in this case the 'find' functio...

10 years ago | 0

Answered
how can I get the gcd for more than 2 terms?
Just apply the 'gcd' function multiple times: p = B(1); for k = 2:length(B) p = gcd(p,B(k)); end

10 years ago | 0

Answered
writing a loop in matlab for huge excel data to get average of 4 numbers repeatedly in the column all the way to end
The 'xlsread' function returns a 'double' format array, not a cell array, and therefore you should be using parentheses, not cur...

10 years ago | 0

| accepted

Answered
numerical error in eig command
While it is quite true that in an ideal mathematical sense the eigenvectors of your matrix A ought to be linearly dependent, you...

10 years ago | 1

| accepted

Answered
Area of curved surface
In your grid system you should be able to approximate your three-dimensional surface area as the sum of the areas of a set of tr...

10 years ago | 0

Answered
Contradictions in ANY and ALL?
Probably the best way to see the logic behind TMW's choice is to consider the two identities: any(union(A,B)) = any(A) | an...

10 years ago | 3

| accepted

Answered
Please help me to solve following equations using matlab
For a numerical solution you can use fsolve of the Optimization Toolbox. This requires an initial numerical estimate. It will ...

11 years ago | 0

Answered
How to get rid of exp in answer
Use 'fprintf' with the fixed-point format type %f. For example with your value you could use fprintf('%12.9f',value) to get -0....

11 years ago | 0

| accepted

Answered
A Problem with mvnrnd and mvnpdf function
You have created only a single 1-by-3 random sample, f1, with 'mvnrnd' and p1 is simply the 3D probability *density*, not probab...

11 years ago | 0

| accepted

Answered
I need to calculate matrix b for each iteration from k value 0 to 1 with the step size of 0.01. How can I calculate the iteration using the for loop function and store all iteration outputs in matrix? Somebody please help me. Thank you.
As you can determine by reading the Matlab documentation, you cannot have zero or fractional values for array indices as you hav...

11 years ago | 0

Answered
analyticity of a function
A complex-valued function of a complex variable is defined as analytic if it satisfies the Cauchy-Riemann equations. See: <h...

11 years ago | 1

Answered
When is f negative?
If a > 0, there are no possible combinations of the parameters a, b, and c which lie in (0,1) that will make f(x) always be nega...

11 years ago | 0

Answered
How to find angles, which lies between -π and -2π.Because matlab returns only values between ±π using atan or atand function.
Do this to your angle, 'a': a = mod(a,pi)-2*pi; It will then lie between -2*pi and -pi. [Note: atan gives angles bet...

11 years ago | 0

Load more