Answered
Making line of best fit pass through origin
Download polyfitn from the file exchange.

10 years ago | 0

Answered
Hello there, I need to solve optimization problem.
First of all, I would point out that you use strict inequalities here, < and >. You cannot in general solve a maximization or mi...

10 years ago | 2

Answered
How can you get equations from the complicated graphs by using Matlab?
No. There is NO simple equation that will represent those curves, or any general curve you wish to draw. In fact, there are infi...

10 years ago | 1

| accepted

Answered
I need to minimize a matrix q with large dimension with respect to a function.
What do you mean when you want to "minimize a matrix"? A matrix is a collection of numbers. It has no minimum as such. Are you a...

10 years ago | 0

Answered
How can I extend a vector, representing a curve data, to a desired final dimension N of this vector without changing the curve "behaviour"?
From what you have said, you did NOT smooth the data. Instead, you threw some of it away, but you did not throw away the same nu...

10 years ago | 0

Answered
Defining preferences in non-linear least square solving?
If you want to weight some VARIABLES, thus unknowns in the problem as being more important than others in a linear system, then ...

10 years ago | 0

Answered
Help to avoid the eval() function
Easy, peasy: y = feval(fun,varargin{:}); The {:} makes a cell array (i.e., varargin) into what is called a comma separat...

10 years ago | 0

Answered
Can you help me understand this code?
It looks like a poorly written (and wholly uncommented, which makes it very poor IMHO) code to compute a cumulative mean, then k...

10 years ago | 0

Answered
A question about inpaint_nans.m
Why would they be the same? You are posing two different problems. It sounds like you have reshaped the vector into a 5x20 array...

10 years ago | 1

| accepted

Answered
Can anyone help me with this code?,,its not working at all...{please find the xyz data file. x=lat,y=lon,z=energy)
Hmm. If this code is intended to simply compile total_energy in each cell of a grid, then why not just use a histogram tool (for...

10 years ago | 1

Answered
predictive ability of matlab
This has absolutely nothing to do with the predictive ability of MATLAB. It is entirely to the ability of any code that you will...

10 years ago | 0

Answered
zero crossing and inflection point
Why would you possibly need the second derivative to locate a zero crossing? All this does is look for consecutive elements o...

10 years ago | 0

| accepted

Answered
Curve-fitting using the Curve Fitting Toolbox, gives wrong confidence intervals
Without your data, we cannot verify what you have done, or verify the coefficients, or verify the uncertainties produced around ...

10 years ago | 0

| accepted

Answered
How to find local minima of a function?
First, you are using polyfitn, not polyfit. But without seeing your data, it is hard to really help you that much. If a globa...

10 years ago | 0

Answered
Hi , im getting an error message which says:
Don't name your scripts with the name of existing functions. It will get you in trouble one day if you do. Oh, yeah, it just did...

10 years ago | 0

Answered
How to calculate the follwoing Matrix Continuous Fraction?
Many things wrong. I assume this is MATLAB code you are trying to write? :) Is R something that was created outside of this f...

10 years ago | 0

Answered
How to make a function that loads its own input variables?
Shiver. Kind of a bad idea. You can do it, but a poor choice of interface as you learn to program. Frequent loads are going to b...

10 years ago | 0

Answered
Extracting values of a matrix in groups of 2 that move along the original matrix
Learn to use MATLAB as it is designed to be used. That means to use vector operations for these simple things. There is really n...

10 years ago | 0

Answered
Syntax for solving linear equations
Hmm. I'm not sure what the other solvers are seeing in your question that I don't. Here is your question: a-x*b-c*y (where ...

10 years ago | 0

| accepted

Answered
Cumsum gives different results for double and single
Do you seriously think that single precision numbers have infinite precision? Even double precision? In fact, I'm slightly surpr...

10 years ago | 1

Answered
please i need urgent solution to this. am trying to differentiate two plots on same graph
You need to use hold on between the two plots.

10 years ago | 0

Answered
On my laptop i am running the 2014a 64-bit student version and i get an answer of something 10^6 but at school my same exact code on the 2016a 64-bit version I get an answer of something 10^15 why is this? How can I fix this?
Nobody can even try to answer this as is. You have not supplied all of the information, as at least three files are missing. The...

10 years ago | 0

Answered
Rough interpolation result using Griddata
It does not appear that the data you plot is the data you provide in the .mat file. If not, then how can we rationally help you?...

10 years ago | 1

| accepted

Answered
Hello matlab community, i try to open, read and extract a NetCDF in matlab for over a week without any success. “Errors and their solution on the editor is difficult to understand. How can I work with matlab easily?
You need to explain your problem more clearly. If you have a problem, then give an example. Otherwise, all you can get are broad...

10 years ago | 0

| accepted

Solved


Get linearly independent vectors of given matrix.
Get a set of linearly independent vectors from the rows of a given matrix. Example matrix=[ 3 -1 0 0 ; ...

10 years ago

Answered
Numerical Integration with Parameters
Tools like integral, integrate, quad, etc., are NUMERICAL integration tools. They cannot be used with general unknown (symbolic)...

10 years ago | 0

Problem


Euclidean distance from a point to a polynomial
A not uncommon problem in the area of computational geometry is to find the closest point to a straight line from a given point,...

10 years ago | 3 | 37 solvers

Answered
Storing each realization as a variable
You are asking to store a vector of length 10000 in a single element of a numeric, double precision array. NOT possible. Perhaps...

10 years ago | 0

Answered
Generating random 3D vectors
rand(100,3)*2-1 Read the help. It shows how to do exactly this type of thing. doc rand I'm not sure why you are con...

10 years ago | 0

Load more