Beantwortet
damage equation for uniaxial compression
By multiplying by the product of the two denominators, the equation becomes that of a cubic polynomial in k which will in genera...

mehr als 11 Jahre vor | 0

Beantwortet
how to simulate markov chain
If T is the 5 x 5 transition probability matrix, to find the n-th state, do this: xn = T^n*[0;0;0;1;0];

mehr als 11 Jahre vor | 0

Beantwortet
How to do it more efficiently?
See if this is faster: [t,ic] = ismember(time_synced,cCells(:,1)); curArr(t) = cCells(ic); curArr(~t) = NaN; No...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
Help comparing two matrices
C = sign(A-B);

mehr als 11 Jahre vor | 4

Beantwortet
how to determine the position of points which belong to a circle ?
If the center is at (x0,y0) and the radius is r, then 1) if (x-x0)^2 + (y-y0)^2 < r^2, the point (x,y) is inside the circle...

mehr als 11 Jahre vor | 4

| akzeptiert

Beantwortet
Help with a two variables equation?
In the line T(x,t)=((2*q)/(k))*...... if T is to be a matrix of values, then the 'x' and 't' values must be indices whi...

mehr als 11 Jahre vor | 0

Beantwortet
how to generate a random vector sized 1x100 or 100x1 without the numbers (mod,5)=0 ?
If you want to range uniformly over the first N positive integers that are not divisible by 5 and you want n random samples, do ...

mehr als 11 Jahre vor | 2

Beantwortet
Optimizing a simple code
For your particular problem there is a way to avoid the for-loop using the colon operator, but I doubt if it is what you had in ...

mehr als 11 Jahre vor | 1

| akzeptiert

Beantwortet
Odd behaviour of 2x2-matrix and 2x1-vector operation
Both the differences in real parts and the spurious imaginary parts in y0 and y1 are extremely small and are undoubtedly due to ...

mehr als 11 Jahre vor | 2

| akzeptiert

Beantwortet
how to generate random numbers from a distribution which is the convolution of exponential distributions?
By integrating from 0 to infinity it can readily be determined that the cdf for your density p(x) = x/I^2*exp(-x/I) would be ...

mehr als 11 Jahre vor | 1

Beantwortet
How do i solve 2 equations for 2 unknowns?
For each of the eight pairs of equations you are asking for the two intersections of two circles. Here is a direct solution ext...

mehr als 11 Jahre vor | 1

Beantwortet
how to make looping for random data and discrete
(You should not use the name 'size' for one of your variables, since that is the name of one of matlab's functions, so I have ta...

mehr als 11 Jahre vor | 0

Beantwortet
Logical Indexing a spefic column in a matrix
If M is the original matrix, c4 = M(:,4); M1 = M(0<=c4 & c4<30,:); % <-- Having the angles between 0 and 30 M2 = M...

mehr als 11 Jahre vor | 1

Beantwortet
how to ignore nan values in corr function?
Clearly there is no sensible way to compute a correlation value for two empty vectors. I would suggest that for such cases you ...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
Dear Friends, please help me in finding (matlab code) the inverse of this matrix. F=[ 1 1 -1 -1; -a b c d; e -f -g h; j k l m]. where a, b, c etc are constants.Best Regards.
The Symbolic Math Toolbox contains the function 'inv' which will find the symbolic inverse of your matrix. Or, if the values ...

mehr als 11 Jahre vor | 2

| akzeptiert

Beantwortet
Issue in term mismatch after finding roots
In the expression for 'term1b' you use the variable 'qn'. However, that appears to be the dummy argument for your function 'f'....

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
find time elapse in if statement
According to the documentation for 'datenum' at: http://www.mathworks.com/help/matlab/ref/datenum.html *"A serial date ...

mehr als 11 Jahre vor | 1

| akzeptiert

Beantwortet
how i can draw a sector of a circle in matlab?
Let r be the circle's radius, P0 = [x0,y0] be its center, and theta be the required angle in radians. a1 = 2*pi*rand; % A...

mehr als 11 Jahre vor | 4

| akzeptiert

Beantwortet
Taylor series for multiple variables
See section 9 of the Wikipedia article at: http://en.wikipedia.org/wiki/Taylor_series#Taylor_series_in_several_variables ...

mehr als 11 Jahre vor | 0

Beantwortet
on floating point arithmetic - moler book
Yes, Cleve Moler is correct that the significand (mantissa) portion of IEEE 754 double precision normalized numbers represent 53...

mehr als 11 Jahre vor | 2

Beantwortet
an ode where numerical method fails in matlab
When y nears 1, your differential equation system becomes what is known as 'stiff'. Even though the ideal solution is a perfect...

mehr als 11 Jahre vor | 1

| akzeptiert

Beantwortet
randomly picking from a series of elements
To avoid repetitions you can do the following. Let M be the array with 7000 rows from which you wish to select 500 at random. ...

mehr als 11 Jahre vor | 2

Beantwortet
Minimizing an objective function
Unless you place some further constraints on W values, there is no limit to how much 'f' can be reduced. The right answer would...

mehr als 11 Jahre vor | 1

| akzeptiert

Beantwortet
How can I form a Hankel matrix for the following example?
Let R be an m x n x r array in which r >= p+q-1 using your definition for p and q. Then do this: T = reshape(permute(R(:,...

mehr als 11 Jahre vor | 1

| akzeptiert

Beantwortet
normalize matrix by standard deviation
If A is your MxN matrix and is of type 'double', do this: A = bsxfun(@rdivide,A,std(A)); (This assumes you want unbiase...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
Computing Angles from Coordinate Space
The two lines angle = dot(X1,X2)/3; %cosine angle of rotation angle = acos(cos(angle)); don't make sense to me. On...

mehr als 11 Jahre vor | 0

Beantwortet
how can I determine the areas surrounded by these two plots?
You need to determine the x-coordinates of the three crossing points of the two curves. For that purpose you can use 'fzero', t...

mehr als 11 Jahre vor | 2

| akzeptiert

Beantwortet
Question about diff function
h = h - (V/h+2*sqrt(V*pi*h))/(-V/h^2+V*pi/sqrt(V*pi*h)); (Maybe I am old-fashioned, but with elementary functions like thi...

mehr als 11 Jahre vor | 1

Beantwortet
Solving for a symbol and converting it to double to use in a loop
Cramer's Rule is not what you need to solve for w! Setting your determinant to zero will give you an eighth degree polynomial e...

mehr als 11 Jahre vor | 0

Beantwortet
Using "curl" function and its outputs
Provided you enter x and y as inputs to the 'curl' function, the curl output units are of the field units per x-y units. In oth...

mehr als 11 Jahre vor | 1

Mehr laden