Answered
Runge Kutta method computational cost
tic and toc are really bad ways to estimate the time required for (almost) anything, unless the time is pretty long, and you onl...

12 dagen ago | 2

Answered
Polynomial Fitting of 3 variables
Download polyfitn from the file exchange, here: https://www.mathworks.com/matlabcentral/fileexchange/34765-polyfitn Ensure you...

12 dagen ago | 0

| accepted

Answered
Multiple equations using a range of inputs for one variable then plotting a graph.
Sorry, but your question makes no sense, at least not at first glance. If you want help, then clearly explain what you are doing...

12 dagen ago | 0

Answered
How do I determine goodness of the fit (any curve )when using least square method?
There are many measures of goodness of fit for a least squares problem. NONE of them are perfect. As well, there are entire grad...

13 dagen ago | 0

Answered
how to sum data with condition
Sorry, but it is a really bad idea to have separate functions for each case. Just pass in the the first column element as an ar...

14 dagen ago | 0

Answered
How to calculate displacement from acceleration data?
You already know how to use trapz. Just use it twice. However, you mention instantaneous displacement, and the problem with trap...

14 dagen ago | 0

| accepted

Answered
I need to have underline (_) in my plot x and y label but matlab plot recognizes as subscript
They can't win. Some people want to have subscripts. Some want an actual underscore character. Nobody is ever happy. xlabel 'x\...

15 dagen ago | 1

| accepted

Answered
How can I construct delauany's disc in matlab??
Hmm, if that was what you were expecting, you did not come very close. :) Let me suggest a trick though. Write a little helper...

16 dagen ago | 0

| accepted

Answered
fibonacci series, while loop
Well, what is important to me is you have made a credible effort, and gotten close. In fact, you did compute Fibonacci sequence ...

17 dagen ago | 0

| accepted

Answered
Estimating precision of matlabs matrix solver
The precision? Double precision. It works in double precision. But that is not your real question. The issue is how good are the...

18 dagen ago | 0

| accepted

Answered
Help with Writing Function Files for Nonlinear Functions
Suppose you tried to use the MATLAB function mean. It takes at least one argument. What would happen, if you just tried typing m...

18 dagen ago | 0

Answered
Generate Random Number inside a closed area
Not hard. But it takes a little effort. (I should post a tool for this on the FEX. SIGH. Actually, I have a tool that does this,...

18 dagen ago | 2

| accepted

Answered
What starting point to choose so fsolve always returns a solution when any exists?
I tend to describe tools like fsolve with a metaphor of a blind man set down on the surface of the earth, then tasked with findi...

19 dagen ago | 1

| accepted

Answered
How to use DWT for denoising complex data like OFDM symbol ?
So why not just denoise the real and imaginary parts separately, then combine them back into one complex array. Two calls instea...

19 dagen ago | 0

Answered
icdf versus erfinv?
In general, use the ICDF code! Why would it be more accurate? Because it can be more intelligent, using a more accurate approxi...

20 dagen ago | 1

| accepted

Answered
how do I calculate pi
Easy. Type pi at the command line. Works like a charm. Harder, since you did make a very credible effort at a solution, first, ...

20 dagen ago | 0

| accepted

Answered
how to set initial guesses in Curve fitting to avoid the local minimum?
As Alex says, it is not easy, and no perfect answer exists. The model you have posed is a difficult one to estimate, because i...

20 dagen ago | 1

| accepted

Answered
How to multiply the different values of same variables
And the problem is? P = 1; for i = 1:Imdone x = (stuff) P = P*x; end

20 dagen ago | 0

Answered
Rearrange randomly just some parts of an array
I fail to see the problem, although you are the only one who knows the rules that created this vector, so you will know what to ...

20 dagen ago | 0

Answered
How to generate a vector with specific values (maybe using loops)?
Don't. Instead, use arrays to store them. n = 4; V = eye(n); V V = 1 0 0 0 0 1 0 0 ...

21 dagen ago | 0

Answered
Defining non-coefficient constant in fittype
While this is trivial to solve using the CFTB (that is, fit) it is even simpler to solve using backslash. Assume that omega1 an...

22 dagen ago | 0

| accepted

Answered
How to write log base e in MATLAB?
The log function does exactly what you want. log(14 - y) If you want a base 10 log, you use log10. There is also a log2 functi...

22 dagen ago | 2

Answered
Precision in calculation of large digits
What you need to understand is how MATLAB works. When you have one function call another, it evaluates the inside operation FIRS...

22 dagen ago | 2

Answered
Multiplying every secound element in a vector with -1
You need to start learning MATLAB. That is, actually learn to use vectors, matrices, not just work with single numbers, and loop...

22 dagen ago | 1

| accepted

Answered
Surf plots 2D + color. I want a 3D plot. What is the solution?
But what you have, that is z(x,y), is a 2-dimensional manifold in R^3, that is, a surface embedded in the 3-dimensional cartesia...

23 dagen ago | 1

| accepted

Answered
How to use interp1 to stretch out smaller vector to the size of larger vector?
Assuming that you intend to create a vector of averages, do this: Ahat = interp1(1:1260,A,linspace(1,1260,1778)); C = (Ahat ...

23 dagen ago | 1

| accepted

Answered
Collecting terms / factoring out multiplied terms
Be serious. That is not big. There are some things (this is one of them) that are far simpler to do by pencil and paper than to ...

23 dagen ago | 0

Answered
Less time consuming substitution for if conditional
I think you are focusing on the wrong things. This is NOT a slow operation. Very likely, this is part of a large, inefficiently...

24 dagen ago | 0

Answered
How do I do this function?
x = -1:0.1:1; f = x.^2.*sin(pi.*x); g = max(0,f);

24 dagen ago | 0

Answered
How can I fit data to a sine curve?
I'll guess the model you want is as below, but use the curve fitting toolbox. Your model might be defined as: ft = fittype('si...

25 dagen ago | 0

Load more