답변 있음
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년 초과 전 | 0

| 수락됨

답변 있음
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년 초과 전 | 2

답변 있음
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년 초과 전 | 1

답변 있음
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년 초과 전 | 1

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

10년 초과 전 | 0

| 수락됨

답변 있음
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년 초과 전 | 2

| 수락됨

답변 있음
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년 초과 전 | 0

| 수락됨

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

10년 초과 전 | 2

| 수락됨

답변 있음
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년 초과 전 | 1

| 수락됨

답변 있음
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년 초과 전 | 1

| 수락됨

답변 있음
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...

거의 11년 전 | 0

답변 있음
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...

거의 11년 전 | 0

답변 있음
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/...

거의 11년 전 | 0

답변 있음
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

거의 11년 전 | 0

답변 있음
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...

거의 11년 전 | 0

답변 있음
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...

거의 11년 전 | 0

답변 있음
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...

거의 11년 전 | 0

답변 있음
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

거의 11년 전 | 0

답변 있음
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...

거의 11년 전 | 0

| 수락됨

답변 있음
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...

거의 11년 전 | 1

| 수락됨

답변 있음
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...

거의 11년 전 | 0

답변 있음
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...

거의 11년 전 | 3

| 수락됨

답변 있음
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년 전 | 0

답변 있음
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년 전 | 0

| 수락됨

답변 있음
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년 전 | 0

| 수락됨

답변 있음
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년 전 | 0

답변 있음
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년 전 | 1

답변 있음
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년 전 | 0

답변 있음
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년 전 | 0

더 보기