Answered
Find and classify the first four stationary points for t ≥ 0 of the function: f(t) = sin(c1*t)*e^(0.1*t), where c1 = 1
t = mod(-atan2(c1,0.1),pi)/c1+(0:3)*pi/c1; % <-- Corrected

11 years ago | 1

| accepted

Answered
how to integrate over array boundaries
If you consult the website: http://www.mathworks.com/help/matlab/ref/integral.html you will find that 'integral' does n...

11 years ago | 1

Answered
what does "It is not detecting if a matrix is even or non-square" mean?
[m,n] = size(M);

11 years ago | 1

| accepted

Answered
Is this a valid vectorization of my loop?
I think there is still inefficiency in your computation. For every different beta, you repeat the same computation c=Gras...

11 years ago | 1

| accepted

Answered
piecewise function evaluation using if-else statement
Matlab's 'if' statement requires that if the following condition is a multiple-element logical vector, then every one of these m...

11 years ago | 0

| accepted

Answered
This function keeps returning the error"ttempted to access wf(2); index out of bounds because numel(wf)=1. "
Matlab states that the number of elements it finds in 'wf' is 1. It must mean that you passed a scalar 'wf' to 'Powerval' when ...

11 years ago | 0

Answered
one equation with one unknown variable
I would recommend that you alter the interval: x=fzero(@f,[0,.999999]); There is an easier way of solving it. Substitu...

11 years ago | 2

Answered
if condition equal many variables
You should realize that "6==6==6" is operated on as: (6==6)==6 The (6==6) will give a true result, and which in combina...

11 years ago | 1

| accepted

Answered
How does the following two codes differ? both are working, but they are yielding different answers
In the functions 'sing' and 'sing2' you have "if x1 > a". If x1 is a many-element vector, this only comes true what all element...

11 years ago | 0

| accepted

Answered
How to enter math formula in Matlab as they appear in math
I heartily agree, Yashar. I, also, would like to do these things with formulas and equations, and much more. For a long time I...

11 years ago | 1

Answered
definite complex integrals ..help me plz
Your integral from minus infinity to plus infinity is divergent, because for large x the integrand behaves like 1/x, which would...

11 years ago | 0

Answered
Help me with this error!
Instead of: y(index) = pi*(x.^2 + 1).^2 *l; you should write: y(index) = pi*(x(index)^2 + 1)^2 *l; Either that...

11 years ago | 1

| accepted

Answered
How can I generate this tyope of matrix as shows in the follow
Matlab's 'toeplitz' function can simplify this generation greatly.

11 years ago | 0

Answered
closed contour integral complex
You need a 'dot' in the definition of 'fun': fun=@(z) (z)./((z.^2+4).*(z-1)); The message "Error using ==> mtimes" is t...

11 years ago | 0

| accepted

Answered
I'm getting wrong answer?
In each of your 30 disks you are using the radius at its smaller end, so of course your answer will be smaller than the true vol...

11 years ago | 1

| accepted

Answered
Constructing a symmetric matrix
Very likely your B matrix only lacks symmetry because of round-off errors in the computation process. Do this instead of using ...

11 years ago | 1

Answered
How to do a double integration of a multivariate normal probability density function
You can also compute this using the Statistical Toolbox function 'mvncdf'. See its documentation at: http://www.mathworks...

11 years ago | 0

Answered
Very long execution time for loop "end" command
If NInj is a large number, the lines 70 and 71 are needlessly repetitive and therefore constitute a very inefficient code. If y...

11 years ago | 0

| accepted

Answered
Angle function output convention
a = mod(angle(z),2*pi);

11 years ago | 2

Answered
How can i create n-linearly independent vectors?
You can also use matlab's 'orth' function to generate linearly independent vectors which span a given space. They will in fact ...

11 years ago | 0

Answered
Wrong index acquired or wrong value taken from the index
In the line [xmx,loc] = max(Fbump1(:,3,n)); the index 'loc' refers to the row number of the maximum value in the third ...

11 years ago | 0

| accepted

Answered
calculating the root of a complex number
In both your "faulty code" and your "detour" you are using matlab's 'sqrt' function to obtain 'H12', and apparently in each case...

11 years ago | 1

| accepted

Answered
Can any body help me to form a full matrix which is having sub matrices.And these sub matrices are similar to each other. I have used counter to repeat the same calculation. where i is varying row wise and similarly k is varying column wise.
As k is varied, D5 is written at the same positions repeatedly from k equal to 4 to k equal to 9. Only the final one will remai...

11 years ago | 0

| accepted

Answered
Hi All, My question to all is that .......... I have to add the elements with in the matrix.........
Let A be an n-by-n matrix. B = [zeros(1,n+2);zeros(n,1),A,zeros(n,1);zero(1,n+2)]; % Create a border of all zeros B = ...

11 years ago | 0

| accepted

Answered
Index = Index+ Column -1
Where you write [maxV,I]=max(A(k:n,k)); the index, 'I', which is returned, is relative to the portion of A that is bein...

11 years ago | 0

Answered
Computing series in MATLAB
The reason you're having trouble finding that limit is that there is no finite limit! The expression goes quickly to infinity a...

11 years ago | 1

| accepted

Answered
Issues when multipling and summing very small values in a matrix
I think it is likely that you are not displaying your results with sufficient accuracy to see the actual values of small quantit...

11 years ago | 1

Answered
Inverse of a particular function
It is possible to solve your equation for v explicitly. However, it should be understood that if any solutions exist, there wil...

11 years ago | 1

Answered
Inserting an array in another to make an Nested Array
ONE = [1 0 1;0 0 0;1 0 1]; M = (your current matrix of 1's and 0's) M = kron(M,ONE); % This will be the next version...

11 years ago | 2

Load more