Answered
Solving a set of equations numerically where solutions are complex numbers
Not all nasty looking, high order nonlinear systems of equations have solutions. vpasolve is a capable numerical solver, but it ...

9 years ago | 1

| accepted

Answered
Error:index must be a positive integer or logical.
You have created (somewhere) a variable f. f is a scalar, a vector or an array. Where is the 1.99'th element of that array? W...

9 years ago | 0

| accepted

Answered
Perform double integral of a symbolic equation?
Simple. You have created all of these symbolic elements of a matrix. Use int! It does integration. Some things to think about: ...

9 years ago | 0

Answered
Writing the function list for "Batched partitioned nonlinear least squares"
Ok. I'll answer this, even though I refused to answer it when asked directly just the other day. I'm sorry, but I refuse to do e...

9 years ago | 1

| accepted

Answered
Can I find the inverse of a sparse matrix faster?
I'm confused. I already showed in your last question that creating u speeds the code up, as otherwise you would need to form u t...

9 years ago | 1

Answered
How to divide a large sparse matrix
You don't think it a bit silly to compute the subexpression: NN\( eye(T)) twice instead of doing it once? Do you pay ext...

9 years ago | 0

| accepted

Answered
what happen inside the fast fourier transform(fft) code ?
MathWorks does not give out details of compiled code, at least unless you are an employee. At most, you can read the doc for ...

9 years ago | 0

Answered
Trigonometric equation mystery?
First, you need to understand that sqrt(3)/2 is NOT 0.8660. There is a difference. Small errors like that will often be signific...

9 years ago | 1

| accepted

Answered
how to implement savitzky golay filter without using inbuilt functions
Learn to use tools like conv or filter. They can accomplish the desired result, given the proper input. Or download a Savitsky-G...

9 years ago | 0

Answered
Is there a "go to" command in MATLAB
I have no idea what you really wanted that code to do. But essentially always, when someone pleads for a goto statement in MA...

9 years ago | 0

Answered
Formulate linear programming problem
Can you use linprog? If you split an item 60-40, would that be acceptable? If not, then linprog is not possible. This is esse...

9 years ago | 0

Answered
I want to apply what the norm function does, without using norm.
Since this seems to be homework, if you don't want to use canned code, I will ask you to think on your own a bit. At the same...

9 years ago | 0

| accepted

Answered
Descriptive Statistics of entire array
So, you can't just compute mean(x(:)) mode(x(:)) etc?

9 years ago | 0

Answered
Doing optimization via GA, I need a veriable to be 60 < x < 100 or x = 0. How?
No. This would be a variable that both continuous AND discrete. You can have one or the other but not both in the same variable....

9 years ago | 1

| accepted

Answered
plotting function of multible variable
Use a matrix to store your data, NOT vectors that you then over-write. You can use cell arrays if you want, but as long as yo...

9 years ago | 0

Answered
Why is Meshgrid Command not working with decimal values?
Meshgrid DOES work. At least when used properly. :) Your problem here is not with meshgrid. I think what you did was to assum...

9 years ago | 1

| accepted

Answered
how can we see the inner programming of any function??
You often cannot see code. Much of MATLAB is provided as compiled code. This gives you efficient code, which of course you want ...

9 years ago | 1

| accepted

Answered
How can I know if there is bugs in my formula? because the result is so strange. Thanks
NEVER just throw together a long string of unreadable code, then try to evaluate it at the end and expect anything meaningful to...

9 years ago | 0

Answered
Eigenvalues and Eigenvectors - How do I work out which eigenvalue corresponds to which eigenvector?
I see from your comments to Jan that you still want an answer on how to know or fix the order of the eigenvalues. In your words:...

9 years ago | 0

Answered
create a function for integration
I'm a bit confused by your question. You can do the integration using pencil and paper. This reduces to a simple exponential fun...

9 years ago | 0

Answered
Trajectory planning with single polynomial
Using a polynomial of degree 14 is simply a bad idea. Almost any computation done in double precision arithmetic will be unstabl...

9 years ago | 0

Answered
I need to generate an 8 element vector that puts out unique numbers from [3,63]
You did make an effort. Assuming you can't use randperms... xlow = 3; xhigh = 63; m = 8; [~,tags] = sort(rand(1,x...

9 years ago | 0

| accepted

Answered
Would you consider actually matlab a smart software ?
IMHO, an unanswerable question. Smart? No software is smart, unless you happen to have a copy of the Skynet code. I'm pretty ...

9 years ago | 0

Answered
Fitting non linear function, R^2 and p value
You don't say what is your model, and that can be important. Note that R^2 has significant problems when no constant term is in ...

9 years ago | 0

Answered
Problem with using variable of For
NEVER test for exact equality of floating point numbers. Because, for example, it is impossible to store the number 0.3 EXACTLY ...

9 years ago | 0

| accepted

Answered
How can i change my code by using the mod command?
days = {'Friday', 'Saturday', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday'}; days(mod(N,7) + 1)

9 years ago | 1

Answered
How to print out the exact value for a variable in the workspace?
I'm not really sure why you want to know this exactly for any matrix of numbers. It will get a bit long to write down the exact ...

9 years ago | 0

Answered
How to get the relations of two variables in one complicated equations including complex numebrs_
I'd strongly recommend using vpasolve, not fsolve here. While some people think fsolve works for complex input, it does not alwa...

9 years ago | 0

Answered
All possible combinations from a matrix such that sum of all numbers equals to a fixed value
You are in trouble for a variety of reasons. This is a variation of a classical partitions problem, usually described in term...

9 years ago | 0

Answered
multi Exponential regression method
For example: mdl = fit(rand(100,1),rand(100,1),'exp2') mdl = General model Exp2: mdl(x) = a*exp(b*x) + ...

9 years ago | 0

Load more