Answered
is it possible to merge several fitted curves (cfit objects) to one new curve?
It would be far better to fit ONE curve to an aggregate data set, as Ido below. However, you could simply average the coeffic...

9 years ago | 0

Answered
calculation variable x besselj
Note that there are infinitely many solutions to this problem. You can see that if you examine the plot shown. ytarget = 5;...

9 years ago | 6

Answered
how to transform (-6*exp(-t/4)*(cos((15^(1/2)*t)/4) - (15^(1/2)*sin((15^(1/2)*t)/4))/9)) to only 'cos' function in matlab?
Ignoring the exponential term outside, you have a trigonometric expression of the form cos(k*t) - sqrt(15)/9*sin(k*t) W...

9 years ago | 1

Answered
Interpolating a three point curve at any angle using cubic splines
Simple. Work in polar coordinates, centered around the location (0,0.4). Now you will fit a curve for radius (thus distance f...

9 years ago | 0

Answered
is it ok to have a function where the input is the output
Yes. function x=myfun(x) % stuff end is entirely valid. A little on the boring side, but...

9 years ago | 0

| accepted

Answered
radius of a curve in a set of data points
You are doing it the wrong way. DON'T think of this as two lines, that you estimate first, and then try to slip a curved arc in ...

9 years ago | 1

Answered
How can I transform exponential equation?
Is there some reason why you think an analytical solution exists? In fact, there is no analytical solution. Wanting magic to ...

9 years ago | 0

Answered
FORTRAN and MATLAB codes cannot obtain the same AAF. Can you correct the MATLAB code ?
The difference is you needed to use fft2 in MATLAB. Just because the name is the same, does not mean the two functions do the...

9 years ago | 0

Answered
Why doesn't my code proprely plot the polynomial?
You need to look at your typing. f = @(x) (x^.6 - 8*x.^5 - 5*x.^4 + 40*x.^3 + 4*x.^2 - 32*x); Are you computing x.^6 the...

9 years ago | 1

Answered
How can I get the RGB values of colors at the SAME value even in different environments?
NO. I don't know that it should not change. The RGB that you observe in a picture as taken is not something that is immutable, a...

9 years ago | 0

Answered
Could you give me a simple explanation of how to smooth a signal?
This is not a question about MATLAB, but a request for someone to write a small book. Ok, a large book if done well. So I should...

9 years ago | 1

Answered
Interpolation with unequally spaced points
help scatteredInterpolant Don't expect it to extrapolate well.

9 years ago | 1

Answered
how can i subtract the elements in a coloumn ?
Start reading the tutorials. diff(a(:,1))

9 years ago | 0

| accepted

Answered
I am trying to solve a set of equations and want the answers in terms of 'a', 'b' and 'S'; how do I put these into matlab without giving them a numerical value?
Surely if you know how to create symbolic coefficients A,B,C,D, why would you not think that you also needed to define a, b, and...

9 years ago | 0

Answered
How to generate uniformly distributed weights between intervals that sum to one?
For general sets of intervals, randfixedsum does not work. For this reason I provided <https://www.mathworks.com/matlabcentral/f...

9 years ago | 1

| accepted

Answered
How does the automatic scaling factor from the polyfit function interact with polyder?
Sigh. First of all, what Star Strider showed you is NOT necessarily the best way to solve the problem, since trapz is simply a t...

9 years ago | 1

| accepted

Answered
How should I integrate f(a,b,c)da which a is from [a1, a2] ;the answer is should be a function of b and c.
You need to use the symbolic toolbox, if you want it to show as a function of the other variables, with them in symbolic form. ...

9 years ago | 0

Answered
How to fit a custom non-linear function with known (and constant) value of uncertainty?
Well, you COULD do this, in a sense. Not using fit however, because tools to do curve fitting do not have anything like that as ...

9 years ago | 0

| accepted

Answered
Hi...can we create a variable "a" with double array type ? . Thank.
You want to create an array that has double precision class, thus a "double", but contains a string, 'a'. Sorry, but you cann...

9 years ago | 1

Answered
Finding the exponential of a very small number
Multiple ways to solve this problem. Sorry, but quad precision is not an option. There is no way to achieve quad precision, at l...

9 years ago | 1

| accepted

Answered
Changing real part of complex number?
X = (1:35)' * (1+1i); % not being very creative here Now, there are lots of ways to just kill the real part of only the 34...

9 years ago | 0

| accepted

Answered
How can i use matlab in seismic masw analysis ?
Yes. There are tools available to read segy, although you may need to find them on the file exchange. I did not look to see if t...

9 years ago | 0

Answered
division of two vectors
A=[-1;1;7]; B=[5;7;-2]; First of all, A and B are NOT row vectors. They are column vectors. Thus, A is a vector in colum...

9 years ago | 1

Answered
Can someone help me with this?
First, read this: help strfun Look at the functions you will find there. Read the help for those that might seem to be o...

9 years ago | 0

| accepted

Answered
What should be done to accelerate computations?
- Get a faster computer. - Get more memory. - Solve smaller problems. - Write better code. - Learn to use better techn...

9 years ago | 0

| accepted

Answered
Diagonal Elements of the Square Matrix
If the diagonal is already EXACTLY zero, then this will suffice: M = M + eye(size(M)); If they are only approximately ze...

9 years ago | 1

| accepted

Answered
Generating a discrete RW on a unit circle and calculate its long-time distribution
Ok. New to MATLAB or not, I'll give you credit for having made a credible effort. So what are you doing wrong here? You are l...

9 years ago | 1

Answered
How to set an initial value for an equation?
You can want them to start at 300, when t == 0, but they don't. Period. I'll write them as a function handle. And I will not ...

9 years ago | 0

Answered
Tranform for loop into matrix operation
The trick is to convert your subscripts into a single index. The function that can do this for you is sub2ind. For example: ...

9 years ago | 0

Answered
Using interp2 - The grid must be created from grid vectors which are strictly monotonically increasing.
The non-increasing sequence of the pressures is the first problem, and obviously the reason the code failed. There is also th...

9 years ago | 1

| accepted

Load more