Top 5% contributor
How might I define a function handle?
For example, I want to define a function f(x)=2*x^3+7*x^2+x
I want MATLAB to evalua...
Asked 4 years ago
What does this error message mean?
??? Error using ==> odearguments at 120
Inputs must be floats, namely single or doubl...
Asked 3 years ago
What does it mean for MATLAB to have a machine epsilon 2.2204e-16? Does that mean we can only be sure of a number up to the 15th...
Is it possible to construct a code that for example we type in x^2 and then the program finds (d/dx)x^2=0 and gives x=0?
Say I have a loop that something like:
var3=... so on
I want to draw a cobweb graph for sin(x).
Here is a code (based on an online source) that seem to fail to work, grateful if some...
In my understanding,
RelTol = abs(X-Y)/min(abs(X), abs(Y))
AbsTol = abs(X-Y)
But what does it mean when applied ...
What I wish to do is to model the trajectory of a point particle of small negative charge in the field of a point charge of lar...
This question has to do with the question in this link which Jan has kindly shed some light on.
I am trying to use ode45 to solve a system of ODEs.
What I did was:
tspan = [...]
Just wondering... suppose I have a code like
a = 1+2+3;
b = 1+3+5;
c = a+b;
What is MATLAB actually d...
1) Suppose I have two numbers, say 0.01234567 and 0.01234599 and I want Matlab to round off the numbers to give the number of d....
Given a function f(x), Is there a simple way to get MATLAB to determine the number of zeros it has in some arbitrary interval [a...
How might I make my script perform differentiation on a user-defined function? I also want the function and its derivative ...
I am attempting to write a Matlab script that uses a user-input (hence general) function, f(x), throughout the script. I ...
Is it possible to convert an m-code into a png -- a picture of the code?
I have written a MATLAB code say myfun.m which first line is
function y = myfun(x)
Now I want to call it in another c...
I have some problem with plotting.
Basically I have a vector
while ... %a bunch...
I am confused. I think that ode45 uses a variable time step determined by the tolerance settings. But programs using ode45 tend ...
Why is it that when I give the command
I get the error message
??? Undefined function or method ...