Respondida
how to get convolution for two signals without using conv command
Several ways you could do this. If your signal is represented as a discrete sequence, then just use a double loop, accumulating ...

más de 4 años hace | 0

Respondida
Countering error while using interp1 function
Your problem is NOT in interp1. It is in the incorrect use of datetime. Read the error message: Error using datetime (line 597)...

más de 4 años hace | 2

| aceptada

Respondida
Does Matlab have a way to find the formula that defines a sequence?
Things are never as easy as you think. For example, is there a simple difference relation that will generate this sequence: P =...

más de 4 años hace | 2

Respondida
Comparison of very large numbers
@Steven Lord said it exactly correct. The problem is not that a tool like ismember rounds anything, nor that ismembertol would h...

más de 4 años hace | 0

Respondida
How to convert BigInteger into binary?
You would not expect dec2bin to do it, when you convert the number oto a double. It will fail above 2^53-1, and that number is s...

más de 4 años hace | 1

| aceptada

Respondida
Matrix in matlab equation
An alternative to repmat is to use a dot product (if you are an old APL person like me, then the phrase "outer product" will com...

más de 4 años hace | 0

Respondida
How to get more than 1 ans
The thing to remember with functions that return more than one argument is what MATLAB does with those arguments. Consider any f...

más de 4 años hace | 0

Respondida
Create a double identity matrix matlab
There are many basic ways, some not so basic. Perhaps my favorite is just: n = 8; A = triu(tril(ones(n)),-1) Here is another ...

más de 4 años hace | 2

| aceptada

Respondida
How to find the coefficient matrix of a set of nonlinear equations?
This is a linear problem, IF you recognize that each of the right hand sides are linear in a,b,c,d except for the cube around th...

más de 4 años hace | 1

Respondida
Difference in exp(a*b) and (exp(a))^b when b is a fraction and a is a complex number
They look like they should be the same, yes. But sometimes your intuition about what is mathematically correct leads you astray ...

más de 4 años hace | 3

| aceptada

Respondida
Projection of 3D points on plane
Why do you think the original distances between the points should be the same after a projection? NOT SO!!!!!!! In fact, it is t...

más de 4 años hace | 0

Respondida
Optimization of function of 3 variables
You need first to define this as a function handle. Then you need to use FMINCON as the solver, or GA will also work. The const...

más de 4 años hace | 1

Respondida
Calculating the mathematical expression
There are two possible questions in this. You have a vector y, and a vector z. You wish to evaluate the expression for x, for A...

más de 4 años hace | 0

| aceptada

Respondida
I can't calculate the integral function in this exampleCan anyone give me some advice? thank you
You can't use a tool like int to integrate a vector of numbers. In fact, all you were doing is integrating a constant. Instead,...

más de 4 años hace | 0

Respondida
Need help to solve nonlinear ode in matlab
Just for kicks, I had to try solving this using dsolve to see what it would do. syms u(x) T = 1; R = 0.5; % Just picking a va...

más de 4 años hace | 0

| aceptada

Respondida
Termination tolerance with fzero function
As Torsten suggests, you cannot use fzero with no initial guess. In fact, fzero runs better with a bracket, than just a single g...

más de 4 años hace | 2

Respondida
Why am I getting an out of index error?
You created the function handle J. J has argument x1. So inside J, it sees whatever you pass in as x1, apparently you think th...

más de 4 años hace | 0

Respondida
linear least square with nonlinear constraints
Fmincon requires a single objective to optimize. So if you have a set of 18 equations, in 12 unknowns, then you formulate the ob...

más de 4 años hace | 0

| aceptada

Respondida
How would you impliment this optimization in MATLAB?
This is a moderately simple problem with 5 unknowns. Another solver may be safer, because of the absolute values, but they are i...

más de 4 años hace | 1

| aceptada

Respondida
Finding erf using Maclaurin series breaks down around x = 5
Do you expect that all infinite series are convergent? And sometimes, even a series that is theoretically convergent for all x, ...

más de 4 años hace | 0

Respondida
minimum distance between a given set of point and a curve
Simplest is to use my code distance2curve, as found on the file exchange. It finds the distance to a general space curve, to eac...

más de 4 años hace | 0

| aceptada

Respondida
How to numerically solve and plot definite integral with variable upper limit
There are many trivial ways. Off the top of my head ... Repeatedly integrate, using a tool like integral, from 0 to x, then plo...

más de 4 años hace | 0

Respondida
Vandermonde-like matrix
The easiest way? Probably this line: (in R2016b or later) x.^(((0:-1:1-n)' + (0:-1:1-n))/2) If you want to use two lines of co...

más de 4 años hace | 1

Respondida
Best way to get rid of/ prevent function from creating complex numbers?
You cannot simply force that a complex number will never arise. There is no flag you can just set to tell MATLAB to never create...

más de 4 años hace | 1

Respondida
Buy or trial MatLab R2009b
NOBODY can just give it to you. Can you buy it? You can get a current license. That would, in theory, alow you to download an o...

más de 4 años hace | 0

Respondida
Define an event in a signal
So, are you asking someone to teach you how to write a gui interface that will do all of this? That is a big request, and it wil...

más de 4 años hace | 0

Respondida
Program helix spiral with radius?
This does not seem to be obviously a homework problem. so... To solve such a problem, you need to understand a spiral, and what...

más de 4 años hace | 1

| aceptada

Respondida
I am trying to find the roots of this equation but my code doesn't work. It keeps saying theta0 is unrecognized,
It appears that your equation is: theta0= x*tan(theta0)-4.905*(x^2)/((v0^2)*((cos(theta0))^2))-(y0-yf); and you wish to solv...

más de 4 años hace | 0

Respondida
When I'm using the fmincon function to solve an optimization problem,the optimization result is always near the initial value. How to avoid this situation?
Resetting the step tolerance will probably not help. In fact, that may be a bad idea, or it may be what you need. Before you try...

más de 4 años hace | 1

Respondida
Unrecognized function or variable 't'.
Contact the authors of the paper, as apparently having submitted crap for code with undefined variables. Worse, it got accepted ...

más de 4 años hace | 0

| aceptada

Cargar más