Answered
how do i plot x>=0, z>=0 and xz>=y^2 ?
You don't want to plot data points. So tools like plot, line, scatter, etc., are all inappropriate. You don't want to plot a sur...

9 years ago | 0

Answered
FSOLVE seems to find complex roots correctly (although it shouldn't)
Fsolve CAN work, under some circumstances. Consider the function x^3 + 2*x^2 + 3*x + 4. roots([1 2 3 4]) ans = ...

9 years ago | 1

Answered
please help me some of my predefined,built in functions are not working
Don't name your scripts things like class, or ANY other already used name. Read what it told you: Error using legend (line ...

9 years ago | 2

Answered
Multivariate fit with two unknown coefficients and known intercepts
Using the modeling tools you know, this is correct: % some random data x1 = randn(100,1); x2 = randn(100,1); Y = x...

9 years ago | 0

| accepted

Answered
Result of z+conj(z) and z*conj(z) with z complex by default
Absolutely impossible. ;) But why not try it? syms z simplify(z+conj(z)) ans = 2*real(z) simplify(z*conj(z...

9 years ago | 1

| accepted

Answered
spline interpolation for repeated (non periodic) data?
Um, a spline is a tool that allows you to predict a SINGLE valued function, of the form y = f(x) You are calling spline ...

9 years ago | 0

Answered
Is there any way I can make the attached contour plots more smooth ?
Sorry. If you try to resize a matrix (using interpolation) that is not itself sufficiently smooth that the original matrix yield...

9 years ago | 2

| accepted

Answered
How can I determine the vector of x's in the following equation, which minimises the vector of y's, given the set of constraints?
Was it really necessary to post a picture of a simple set of two equations in two unknowns? help intlinprog This is a li...

9 years ago | 0

Answered
Creating a diagonal matrix
That is not a diagonal matrix, not by the common definition of the term. It has non-zero diagonals, but that is as far as I migh...

9 years ago | 0

Answered
How to compute uniform cumulative distribution functions without an existing unifcdf (error UndefinedFunction)?
This seems a bit silly. The CDF of a uniform distribution is a straight line, running from the min to the max of the data. WTP?

9 years ago | 0

Answered
function 'nearest' vs 'knnsearch'
At the command line, type this: which nearest -all In my version of MATLAB, it finds TWO such function, both of which li...

9 years ago | 0

Answered
I need to create a function that projects vector b onto vector a
All you are missing is that b is a vector of ones, of the same size as a? b = ones(size(a)); At least, that is all you t...

9 years ago | 0

| accepted

Answered
how to write code for this equation?
Um, you got exactly what you plotted? My crystal ball is so cloudy today, that I cannot read your mind. What did you want to ...

9 years ago | 0

Answered
Creating a smooth meshgrid
Um, seriously, what do you expect? You have created a square lattice with 27 nodes in each dimension. Had you used more points, ...

9 years ago | 1

Answered
Plot a curve that splits data into two sets
But why would a polynomial regression fit have any chance of satisfying this goal? It would be pure random chance if it came eve...

9 years ago | 0

Answered
Why I can not change email address ?
This is not a question for answers. We are not customer support here. There is no way that we can help you. Instead, <https:/...

9 years ago | 1

Answered
what's the problem with my matlab
You cannot have an old enough release of MATLAB that you do not have this function, since it was released before 2006. The pictu...

9 years ago | 0

Answered
Derivative of a function that cannot be simplified.
It is not that the example relation "cannot be simplified". It is an implicit problem, where you cannot write y as a function...

9 years ago | 0

Answered
Huge error while using data fitting in simbiology
The crystal ball is so foggy today. What exactly you did, what you tried. We cannot read your mind. But I'll hazard a guess. I m...

9 years ago | 0

Answered
When taking cross product I end up with NaN. how can i fix this?
No. You cannot "fix" it, in the sense that you will always get something with a NaN, using the code you have on the data you hav...

9 years ago | 1

| accepted

Answered
What function can fit this line better?
This happens because you are doing the fit in the wrong way. Yes, you can do a weighted nonlinear regression fit. But the ...

9 years ago | 1

| accepted

Answered
Wrong result as comparing two double numbers in Matlab 2016
What is wrong is your appreciation of how numbers are stored in floating point arithmetic. Doubles are stored in a binary for...

9 years ago | 1

Answered
Determining the time(x-value) if a exponential function reaches a specific value using fit or any other funtion
Why would you need to approximate a given function using another (exponential) function, and only then solve for a time? Use ...

9 years ago | 0

Answered
Manipulating strings defined with the new double quote option
Too late, but so what? An alternative is: S = "234" S = "234" whos S Name Size Bytes ...

9 years ago | 2

Answered
Can the Fstatistic be used for nonlinear regression fit analysis if the underlying data is not normally distributed?
Yes. The F-statistic implicitly uses a normality assumption in there. To some extent, this is not terrible. Minor deviations fro...

9 years ago | 0

| accepted

Answered
Find intersection between parametric and linear function
r = 2.5; m = 2; b = 0.5; If y = m*x+b, then IF a solution exists, just use vpasolve because no analytical solution wi...

9 years ago | 0

Answered
Fastest methods to solve nonlinear systems MANY times
Big problems take big time. 1. Compiling will almost NEVER yield a speed increase. If it does, any speed boost will not be th...

9 years ago | 0

Answered
Creating a tournament schedule
This is just a round robin of a sort. Can I solve it using a greedy strategy? Start out by list all possible combinations. ...

9 years ago | 0

Answered
How do I solve a PV equivalent Diode Equation with MATLAB?
So you know the problem. Doubles are what you work with in MATLAB by default. If you need number forms with a higher dynamic ran...

9 years ago | 0

Answered
Finding the area of multiple segments and circles
To me, this seems easy enough. 1. Find each circle in the ENTIRE image, not only in the wedge shaped region. Make sure you f...

9 years ago | 0

| accepted

Load more