Answered
three order complex coefficient polynomial root matlab
Another classic solution is to find the matrix that has the same eigenvalues as your polynomial has roots. Then use eig to compu...

3 years ago | 1

Answered
Problem with making cash change
Now that you have an answer, I'll add one that is not solved the way you would do so, but using an ILP solver, so an Integer Lin...

3 years ago | 1

Answered
How do I code for optimization of max volume of box?
It would arguably be a good time to learn about something called Lagrange multipliers. They allow you to build constraints into ...

3 years ago | 0

Answered
write down a function
There is no "function". It sounds as if, given vectors x and h, you want to know what the function would have been, as if MATLAB...

3 years ago | 0

Answered
Using find to determine equality not of scalars, but vectors
This is not really the province of find. Yes, you can break an egg with a hammer, but it is not really the right tool for the pu...

3 years ago | 2

Answered
How to do a Taylor expansion with a matrix
You cannot compute the Taylor series of a constant. You CAN compute a Taylor series, and then evaluate it at that constant value...

3 years ago | 0

Answered
Is it possible to truncate a vector to form one of lower dimension?
You have two choices. First, you can extract the elements you want. Or you can delete the elements you wnat to drop. For example...

3 years ago | 1

Answered
Most efficient way to put vector on the off-diagonal of the blocks of a block matrix
The most efficient way? SPDIAGS. help spdiags For example, to create a 6x6 sparse matrix, with an upper and lower diagonal ele...

3 years ago | 0

Answered
xy+y^5+3=0 My input is real x, from this implicit equation y will have both real and imag values for each x I want to plot a 3 D plot where z will represent imag y. Pleasehelp
Simple enough. Just do exactly what you asked. Remember the roots of a 5th degree polynomial will in general have no algebraic s...

3 years ago | 0

| accepted

Answered
How do I fit two data sets to each other?
This is a classic problem of calibration. You have two curves, one of which must be shifted (translated) to the other. In some c...

3 years ago | 1

Answered
Pick a value with some probability
Please stop asking the same question. There is NO way to know what distribution any set of data comes from. You can use tools to...

3 years ago | 0

Answered
Why is the calculated Rsquare different between the embedded fit function and the EzyFit function (from File Exchange)?
Do you understand that R^2 is not valid, when computed for a model with no constant term? Instead, I recall there are variations...

3 years ago | 1

| accepted

Answered
I wanna implement this function, but it says there is an syntax error..
What langiuage are you using when you end a function with the statement endfunction? Not MATLAB. As well, IF you had posted the...

3 years ago | 0

| accepted

Answered
non-numerical answer for solving complex non-linear equation
I think you do not understand how variables work in MATLAB. Variables are dynamically assigned. When you assign them as you have...

3 years ago | 0

Answered
Can I use my student license for and at work?
I would guess the answer is technically no. But it is arguable either way as long as you remain a student, IF when you are on co...

3 years ago | 1

Answered
A single precision matrix multiplication problem
Why are you confused? NEVER trust the least significant bits of a floating point number. The numbers in a are singles. So the l...

3 years ago | 3

| accepted

Answered
I am stuck in making the pentadiagonal matrix A
This sort of thing is a BAD idea: A = A+spdiags(s_vec, 0, (nx+1)*(ny+1), (nx+1)*(ny+1)); % Add s to the main diagonal of A XX_...

3 years ago | 0

Answered
Find the derivative of a spline curve obtained using cscvn
No. There is no simple "function" of a spline. It is a mess of coefficients that by themselves are fairly meaningless to those w...

3 years ago | 0

Answered
Fitting powerlaw between two points
Given two points exactly, thus: yx = [0.047 100; 0.0382 0.1933]; y1 = yx(:,1); x1 = yx(:,2); You want the power law cur...

3 years ago | 0

| accepted

Answered
How to combine the trapezoidal rule with interpolation in ode23t function
A FREE interpolant is one where the nodes are not fixed in advance. For example, suppose I choose to interpolate sin(x), on th...

3 years ago | 0

Answered
How to get the combination "nCk", if either n or k is a variable.
if x(3) is NOT an integer, then what do you expect? If x(3) is NOT at least as large as d, then what do you expect? In either...

3 years ago | 0

Answered
Fitting 3D data into a function
The curve fitting toolbox does not fit models with more than 2 independent variables. You can use my polyfitn tool, found on th...

3 years ago | 1

| accepted

Answered
How to solve exponential variables
The problem is, you have been trying to SOLVE them. More approproately, you want to use a tool that will FIT your model to the...

3 years ago | 0

Answered
Laguerre polynomials of large degree.
If you are using double precision, then OF COURSE high order polynomials of any form in MATLAB should not be trusted!!!! At leas...

3 years ago | 1

Answered
Shifting an array without circshift
Nobody can know what you did wrong. circshift DOES work. I'm not even sure what you would have done that would cause an error. T...

3 years ago | 1

Answered
trying to solve two non-linear simultaneous equations but I had an error figuring out my two unknowns (X(1) &x(2)) , can anyone pls help?
ARGH. Why would you post a picture of your code? And at that, only a partial picture? Even if I try to show why your code fails,...

3 years ago | 0

Answered
How to determine concavity point?
You give no data, so I'll need to make some up for an example. x = linspace(-30,30,500); y = cumsum((atan(x - 10)/2 + 1)); pl...

3 years ago | 0

| accepted

Answered
What to be chosen c so that all elements of matrix B will be a round number. B=A.c; where A is the matrix of non integers.
You want to find some scalar value c, such that for some given vector A, you want the product A*c = B to be purely a vecto...

3 years ago | 2

Answered
How can i simulate a generic poisson process?
Not sure how you built the vector. Is it a Poisson process? Could be. :) As I recall, if you have exponential inter-rarrival tim...

3 years ago | 1

| accepted

Answered
mvncdf gives different results before and after the variable is standardised
No answer yet? The distinction as I see it is a subtle one. And had your covariance matrix been a diagonal one, then I expect it...

3 years ago | 0

| accepted

Load more