Beantwortet
Not getting proper output for if logic
You mention that |Pr| is an array. If you use if Pr > Kppo then *all* the elements of |Pr| must be greater than |Kppo| f...

etwa 14 Jahre vor | 0

Beantwortet
complex Gaussian noise signals with zero mean and different variance?
Assuming your signals are not correlated, you could do it with cgnoise = std1*randn(n,1) + i*std2*randn(n,1); where |std1| a...

etwa 14 Jahre vor | 2

| akzeptiert

Beantwortet
Very slow for loop
For a problem where the numbers count upward monotonically in each direction, here is a compact and fast solution: y = repm...

etwa 14 Jahre vor | 0

Beantwortet
fmincon get x/fval if output function stops execution
I'm not sure how |fmincon| decides what values to return, but check out <http://www.mathworks.com/help/toolbox/optim/ug/brhkghv-...

etwa 14 Jahre vor | 0

Beantwortet
Function to find if B is an echelon or row equivalent of A
function TF = areRowEquivalent(A,B,tol) TF = norm(rref(A)-rref(B)) < tol; *EDIT*: Take the two lines and save them in a fil...

etwa 14 Jahre vor | 0

Beantwortet
index of zero prolem in matlab
You seem to have a structure array. You could initialize it using mat = repmat(struct('scor',0),length(y),length(x)); See al...

etwa 14 Jahre vor | 0

Beantwortet
Implicit Functions and Iterative Processes in Hydraulics
MATLAB handles implicit functions by changing |f(x)=g(x)| into |f(x)-g(x)=0| and solving for |x|. Here is an example inspired by...

etwa 14 Jahre vor | 0

Beantwortet
create and rotate a line up to a convex polygon vertex
If a convex hull is your goal, you could use <http://www.mathworks.com/help/techdoc/ref/convhull.html convhull>.

etwa 14 Jahre vor | 0

Beantwortet
a command for changing the place of columns in a matrix directly
You can do this with the matrix indices. For the example you give, b = a(:,[2 1]); *EDIT*: See also <http://www.mathworks.co...

etwa 14 Jahre vor | 1

| akzeptiert

Beantwortet
4 different wrong eduations instead of one right after using solve
The web page is not clear, but this seems to be a simple projectile problem where you're trying to maximize the horizontal dista...

etwa 14 Jahre vor | 1

| akzeptiert

Beantwortet
4 different wrong eduations instead of one right after using solve
I'm going to weed out some irrelevant material from your question and format it using the methods in <http://www.mathworks.com/m...

etwa 14 Jahre vor | 0

Beantwortet
How to draw a few different size functions on one 3D graph?
I will assume that by "size" you mean the range of the output (the z variable) and you are plotting a line using |plot3|. If you...

etwa 14 Jahre vor | 0

| akzeptiert

Beantwortet
Large scale generalized eigenvalue problem involving dense symmetric positive-definite matrices
You could use <http://www.mathworks.com/help/techdoc/ref/eig.html eig> in place of |syev|. Or, if you don't need the normalizati...

mehr als 14 Jahre vor | 0

Beantwortet
Equality test not working?
The documentation says "c = setdiff(A, B) returns the values in A that are not in B. " The function |unique| extracts one copy o...

mehr als 14 Jahre vor | 0

Beantwortet
infinite domain uniform random number
Not in practice. If you could, then with probability 1 they would be too large to represent.

mehr als 14 Jahre vor | 0

Beantwortet
making a surface in 3D space with sample some irregular points
You could use the code below as a starting point. First, get rid of the commas and read in your data as follows: p=[0.010 0...

mehr als 14 Jahre vor | 2

| akzeptiert

Beantwortet
pchip extrapolation?
Why would you expect the output to be linear when the input isn't? Look at the end points: y = [-1 -0.98 -0.94 0 0.94 0.98 1]...

mehr als 14 Jahre vor | 0

Beantwortet
Two exponential curve fitting
You'll find this problem described on <http://www.mathworks.com/support/tech-notes/1500/1508.html this support page>.

mehr als 14 Jahre vor | 0

Beantwortet
one line takes ages, but is it possible to optimise any more?
If |circ| is your pre-defined logical matrix and |c| is the matrix to test, you could use incircle = circ & cir; to get ...

mehr als 14 Jahre vor | 0

Beantwortet
function input
Use a <http://www.mathworks.com/help/techdoc/ref/function_handle.html function handle>.

mehr als 14 Jahre vor | 1

Beantwortet
Plotting a Matrix solution as a circle
The easiest approach would be to download <http://www.mathworks.com/matlabcentral/fileexchange/14826-polar-contour-plot Polar co...

mehr als 14 Jahre vor | 0

Beantwortet
Error using ODE45
It's roundoff errors. For the large number of cycles you're integrating over, it's hard to avoid some drift; but you can lower t...

mehr als 14 Jahre vor | 0

| akzeptiert

Beantwortet
How to make a dependent variable real?
To avoid conjugation, just use theta.' instead of theta' (See <http://www.mathworks.com/help/techdoc/ref/arithme...

mehr als 14 Jahre vor | 0

Beantwortet
Activation key
Try <http://www.mathworks.com/support/solutions/en/data/1-5W363T/ Where can I find the Activation Key or File Installation Key (...

mehr als 14 Jahre vor | 2

Beantwortet
Discrete optimization
As far as I know it doesn't. Depending on your problem, you might be able to use mixed-integer linear programming (see for examp...

mehr als 14 Jahre vor | 0

Beantwortet
Problem with Finding the Distance Between 2 Points
Your calculation is correct, but the scales on your x and y axes are very different. The apparently large horizontal difference ...

mehr als 14 Jahre vor | 0

Beantwortet
Increase the precision of the finding roots
Unless this is an exercise, you could just use <http://www.mathworks.com/help/techdoc/ref/roots.html roots> to solve your proble...

mehr als 14 Jahre vor | 0

Beantwortet
nth root using sym class
If you have R2011b, you could use |solve|, for example, y = solve(x^3-5,'Principal value','true');

mehr als 14 Jahre vor | 0

Beantwortet
inverse point solution of b spline
I would recommend you search the <http://www.mathworks.com/matlabcentral/fileexchange/ File Exchange> for "B-spline". There are ...

mehr als 14 Jahre vor | 0

| akzeptiert

Beantwortet
Interpolation / Curve fitting / Empirical formula
Take the logarithms of both sides, so you have a linear regression problem. How you solve that depends on whether you have the S...

mehr als 14 Jahre vor | 0

Mehr laden