Beantwortet
Question on residuez results
The actual partial fraction expansion of 3*x^2+x-2/(((x-2)^2)(1-2x)) is: 3*x^2 + x - (4/9)/(x-2) + (2/3)/(x-2)^2 + (4/9)/(...

etwa 11 Jahre vor | 0

Beantwortet
I want to divide the domain 0 to pi in 5 parts by geometric progression with common ratio r=1.1? how should i do that?
r = 1.1; a = pi*(r-1)/(r^5-1); x = cumsum([0,a*[1,r,r^2,r^3,r^4]]); The values in x are the six endpoints of the f...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
Integral of experimental data
Using 'g' in place of 'gamma', do this: Q = (g*trapz(V,P)+trapz(P,V))/(g-1); or if you want the cumulative integral, re...

etwa 11 Jahre vor | 0

Beantwortet
HOW to Overwrite Matrix Values in a loop, not Append!! ??
If you want X and Y to be completely overwritten on each trip through the for-loop, you will have to make some provision for the...

etwa 11 Jahre vor | 0

Beantwortet
Defining formulas for diagonal and offdiagonal elements of a matrix
A = eye(length(M))*f1+(1-eye(length(M))*f2; where f1 is the formula for the diagonal elements and f2 that for the off-diag...

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
what's wrong here? plz help
The trouble is that your initial values for hl and hu both give the same sign, namely positive, to your function to begin with. ...

etwa 11 Jahre vor | 0

Beantwortet
What's wrong with this expression?
y=a*exp(-(x-b).^2/c^2);

etwa 11 Jahre vor | 0

Beantwortet
rand matrix for FM
If your x values are subject to common upper and lower bounds, you can use my 'randfixedsum' function in the File Exchange, loca...

etwa 11 Jahre vor | 4

Beantwortet
how to generate vector [0:0.01:1] using linspace command
linspace(0,1,101)

etwa 11 Jahre vor | 0

Beantwortet
What is the MatLab Program for this?
Here's a hint to get you started. Suppose you have two positive integers, a and b. How would you use matlab to determine wheth...

etwa 11 Jahre vor | 0

Beantwortet
Zipf Based Number generation
If you want exponent values less than or equal to one, it is necessary to confine yourself to a specific finite number of terms,...

etwa 11 Jahre vor | 0

Beantwortet
how to find nearest values of all elements of a matrix to another matrix in matlab
With vectors as large as these it could very well be advisable to sort the second vector. Let A be the first 11527 x 1 vector a...

etwa 11 Jahre vor | 0

Beantwortet
How can I solve the least square minimization Ax=b when b is unknown?
Whatever the value of d is, the following will give the least squares approximation for E*p-[d;d;d;d] = 0. x = [x1;x2;x3;x...

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
How to define variables using triple integrals
See Mathworks' documentation site: http://www.mathworks.com/help/matlab/ref/integral3.html As you can see, if you have ...

etwa 11 Jahre vor | 0

Beantwortet
How do I solve this problem? I want to make code to solve this problem. I made the matrix D using triu function in matlab and than D=t+t.'
'Facility_units' must be a row vector of non-negative integers in the following: c = cumsum(Facility_units); ix = cums...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
Accessing multidimensional array with pairwise indices
If, as you have indicated, x and y are column vectors, do this: B = reshape(A(bsxfun(@plus,(x+20*(y-1)).',(20*20)*(0:999).'...

etwa 11 Jahre vor | 0

Beantwortet
Transcendental equation with fsolve
In a problem such as yours, Daniel, it is always helpful to redefine your variables so as to simplify the expressions, and if po...

etwa 11 Jahre vor | 0

Beantwortet
Combining the matrix' values
I think the following generalizes what you have requested for a matrix, A, of arbitrary size: [m,n] = size(A); [J,I] =...

etwa 11 Jahre vor | 0

Beantwortet
Integral function gives NaN
My guess is that your 'fun2' at infinity is what is giving 'integral' the trouble. log_normal(rp) is approaching zero and rp^4 i...

etwa 11 Jahre vor | 2

Beantwortet
problem with calculation limit
I would think the limit is zero by L'Hospital's rule, but it is possible that matlab's 'limit' function either doesn't know how ...

etwa 11 Jahre vor | 0

Beantwortet
How to simplify this piece of code?
You are concentrating too much on getting rid of the for-loops. You should look for unnecessarily repeated operations, whether ...

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
how to speed up my program? parallel?
There seem to be a number of inefficiencies in this code: 1) If you make 'vp' a row vector and 'xp' a column vector, the expr...

etwa 11 Jahre vor | 1

Beantwortet
Error trying to solve an equation
I see a couple of dubious entities in your expression to be solved. First, you have used the backslash symbol, '\', which doesn...

etwa 11 Jahre vor | 0

Beantwortet
how to display connection?
I can give you a few ideas. If the x values were all elements of a single vector, you could use for-loops to make comparisons b...

etwa 11 Jahre vor | 0

Beantwortet
Getting all the combinations of 4 vectors?
This is the wrong function for your problem. Your problem has 9^4 = 6561 rows of values, which does not correspond to anything ...

etwa 11 Jahre vor | 1

Beantwortet
Strange error message in for loop code
I think what this means is that 'vpasolve' found two or more solutions on that 121st iteration, but it was trying to stuff these...

etwa 11 Jahre vor | 0

Beantwortet
how to compare two different matrix and set a counter to calculate how many rows matches with all its columns??
You are misusing the 'if' function. Where you write if find ( p1(i,:)==q1(j,:)) the condition will be considered true...

etwa 11 Jahre vor | 0

Beantwortet
Subscript indices must either be real positive integers or logicals.
I would guess that somewhere in your system you have defined a variable named 'mean', in which case matlab misinterprets the cal...

etwa 11 Jahre vor | 0

Beantwortet
Matlab simple iteration error problem
Your 'newtonroothaha' function has the fatal error that Xest is never replaced by the newly calculated Xnew inside the while loo...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
what's wrong with the code?
If you were trying to calculate sin(pi/4), you started with the wrong values for n and sum1. For sin(pi/4) it should be the fol...

etwa 11 Jahre vor | 0

Mehr laden