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

Answered
Which solver can solve this equation for V. Result should be around 59. I tested the to halfs of the equation on python. Thank you for your directions in the first place.
So the second time you asked this question, you provided values for the other variables. I'll first put it in symbolic form so w...

4 years ago | 0

Answered
Hi all,I want to use matlab to calculate the exponential integral,I know that the official function ExpIntegralE in Mathematica can calculate it.
Is there a reason why you would not just use expint? help expint Probably you did not look for it. And that was what you did w...

4 years ago | 0

Answered
Is there a special Matlab function existing to check feasibility of a Point (to a Optimization Problem)
Why should there be a better way? That is, does your check completely answer the question, in a simple way, as efficiently as p...

4 years ago | 2

Answered
How can I get the function g(x) (way to solve functional equation)
NOTHING IN your question is about MATLAB. But you already have an answer. I think you may have a misunderstanding. Is there a w...

4 years ago | 1

Answered
Making Smoother the Curve fit to Airfoil data using cscvn function
I saw your question. You don't need to direct a question at me. However, it appears you are asking how to get a sharp corner at...

4 years ago | 0

| accepted

Answered
I want to find 4 constant with used 1 eq
I'd like to solve a problem just like you. Let me pretend I have been given the equation: a + b + c + d = 5 Can I determ...

4 years ago | 0

| accepted

Answered
Is it possible to implement optimization algorithms, especially particle swarm, with "dynamic bounds" in MATLAB?
The fuzzy bounds you describe are not actually bounds at all, just subtle, vague hints. And code tends not to handle fuzzy hints...

4 years ago | 0

Answered
plot an eight variable function
It is easy, even trivial to do. All you need is one of those nice hyper-dimensional monitors. They are difficult to buy though, ...

4 years ago | 0

| accepted

Answered
Convert striaght lines to smooth curves
Why in the name of god and little green apples are you differentiating acceleration? You need to INTEGRATE acceleration, once to...

4 years ago | 0

Answered
is there codes that helps to find out the type of the distribution ?
As Rik said, difficult to know which distribution a random variable comes from. Don't believe me? x = 0.96489; Do you know if ...

4 years ago | 3

Answered
How to get the cofactor matrix of any given square matrix (singular or non singular)?
The matrix of cofactors is moderately well posed, even when the matrix is itself singular. Of course, what you would do with it ...

4 years ago | 0

| accepted

Load more