Answered
How to sort points clockwise or counterclockwise?
Can you compute the polar coordinates angle, around that mean? (Hint: use atan2. Don't forget to subtract off the mean FIRST.) ...

4 years ago | 1

Answered
Scaling variables for integration with ode15s
There is a reasonable chance your results may problematic, if you do not scale things. While you may get a result, you will have...

4 years ago | 0

Answered
1, 4, 7, 2, 5, 8, 3, 6, 9 serie
Yes, @Tom has given a great answer. The way I would solve it on any normal day. But, just perhaps, is there another way? There a...

4 years ago | 0

Answered
Sentiment Analysis Expand Contractions
Is it possible? Of course. Search for the possible contractions. Replace them with uncontracted forms. Note that SOME forms woul...

4 years ago | 1

Answered
Converting system of equations to form Ax=b
help equationsToMatrix For example. syms x y E1 = x + y == 1 E2 = x - y == 2 [A,B] = equationsToMatrix(E1,E2,[x,y])

4 years ago | 2

| accepted

Answered
How to assign a symbolic matrix to another new matrix?
You are NOT assigning a symbolic matrix to another "new" matrix, but you are instead trying to stuff symbolic elements into an e...

4 years ago | 0

Answered
Access contributor message threads on MATLAB Central
No. And, yes. Sort of. Is that a good answer? If the person you wanted to contact does not have messaging allowed, then you can...

4 years ago | 0

Answered
I need to change this code into one that can solve complex roots
Interesting. It does not work? :) Gosh, You could have fooled me. I'll try an example. (I've attached the code you gave, so it w...

4 years ago | 0

| accepted

Answered
Creating sub arrays from a larger array
DON'T split them into separate, named arrays. This is just a bad way to write code. It will create buggy, slow code, even if you...

4 years ago | 0

Answered
How to plot this implicit function? (It's one parameter also changes)
The vertical axis indicates the value of phi. F3 = @(x,y,phi) y.^4 + y.^2.*(2*x.*tan(phi)-1) + x.^2.*sec(phi).^2; fimplicit3...

4 years ago | 0

Answered
How to find limit of a function
What you have written is NOT a sequence, but a function of one variable. If you are asking how to find the limit of that functio...

4 years ago | 0

Answered
How to obtain an input-output relation for NN trainNetwork or similar functions
This is a common question, where someone wants to see a simple function they can write down and understand, from a complex tool....

4 years ago | 1

| accepted

Answered
How can i take the log2 of x plus 1 of a matrix
What function in MATLAB gives the log, with base 2? help log2 So what line of code would add 1 to x, and then take the log, ba...

4 years ago | 0

Answered
Why ''int'' and ''integral'' return different answers
As others have said, the problem with integral is because of the singularities. Numerical methods don't like singularities. zzz...

4 years ago | 0

| accepted

Answered
How to implement a description for variables in the code?
So you want a tooltip to appear, hovering over each variable or line of code, but have no explicitly written comments in the cod...

4 years ago | 0

| accepted

Answered
Interpolation for 2 dependent output data
Trivial. You just have TWO interpolation problems. Interpolate output1 as a function of the input. Then interpolate output2, als...

4 years ago | 0

Answered
In epsilon test for comparing equality of two numbers. How to improve the test?
Can you "improve" the test? What does improving it mean? How close do two numbers need to be considered the same? For example, ...

4 years ago | 0

Answered
Combination of two values in a list to get the value of an input value
Easy, peasy. Yet, this is very possibly homework. Yet, you have already gotten an answer, that is pure brute force, when a far b...

4 years ago | 0

Answered
convert equation to code
Your problem is that the cosine function produces only numbers between -1 and 1. That is another way of saying that acos ONLY wo...

4 years ago | 0

Answered
syms does not work on my matlab
Is there a reason why you decided to name a script syms, and then tried to use syms itself? What you did was confuse MATLAB, so ...

4 years ago | 2

| accepted

Answered
No solution found. fsolve stopped because the problem appears to be locally singular.
You have a serious problem here, as I think you are having a problem using double precision arithmetic with this dynamic range o...

4 years ago | 0

Answered
How to extrapolate the data
Your model is only a quadratic polynomial. Why you needed to use a nonlinear regression is beyond me, when polyfit would have wo...

4 years ago | 0

Answered
How to constrain the resulting equation from a polynomial surface fit to a positive range?
The lower bounds in fitoptions apply only to the coefficients of the polynomial. That has NOTHING to do with the value of the fu...

4 years ago | 0

Answered
Best method to clear persistent variables
You can also use clear persistent Which will clear all persistent variables.

4 years ago | 1

Answered
How to check in which step MATALB code is running?
I tend to use things like waitbars, or some informative output that gives me a clue. For example, I have been recently running a...

4 years ago | 0

Answered
exp( ) gives unexpected answer for (2,2) input
I would bet a large sum of money that a is not exactly what you think it is. a_you_think = [1.4142 1.4121; 1.4142 1.4121]; How...

4 years ago | 1

| accepted

Answered
How do I integrate LegendreP for specific values of m and n?
help legendre The legendre function evaluates the specified Legendre polynomial at the indicated points. It does not return the...

4 years ago | 0

Answered
Get one equation from two complex roots
You can use help sym/expand to force MATLAB to expand an expression that contains parens. syms s expand((s-(-9+i*3))*(s-(-9...

4 years ago | 0

Answered
"A matrix 'B' of 5x5 whose elements are all 5"
Can you create a matrix of the desired size that is all ones? (Clearly yes, since you know how to use the ones function.) Could ...

4 years ago | 3

Answered
GA - objective and constraints have to run the same expensive function
I would try memoization. help memoize For example, we can use it as in the example below. I've created a function that does li...

4 years ago | 0

Load more