Beantwortet
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

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
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...

etwa 11 Jahre vor | 1

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

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
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...

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
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...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

etwa 11 Jahre vor | 0

Beantwortet
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...

etwa 11 Jahre vor | 2

Beantwortet
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...

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
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...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 11 Jahre vor | 1

Beantwortet
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...

etwa 11 Jahre vor | 0

Beantwortet
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...

etwa 11 Jahre vor | 1

| akzeptiert

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

etwa 11 Jahre vor | 0

Beantwortet
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...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
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 ...

etwa 11 Jahre vor | 1

Beantwortet
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...

etwa 11 Jahre vor | 0

Beantwortet
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...

etwa 11 Jahre vor | 0

| akzeptiert

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

etwa 11 Jahre vor | 2

Beantwortet
i have a while loop i wanna set the condition so it does 'while the array has less than 10 elements it runs'.
while length(i) < 10 .....

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

etwa 11 Jahre vor | 0

Beantwortet
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 ...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
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...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
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 = ...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 11 Jahre vor | 0

Beantwortet
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...

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
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...

etwa 11 Jahre vor | 1

Beantwortet
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...

etwa 11 Jahre vor | 1

Beantwortet
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...

etwa 11 Jahre vor | 2

Mehr laden