- #1
pconn5
- 9
- 0
I have a question for anyone that is familiar with MATLAB.
I'm trying to do some simple integration in MATLAB (and if your wondering why I don't just do it by hand, it is because I want to implement the same code for a wide variety of functions). The problem is when using int(a) in matlab, it won't integrate a simple linear function such as x+6 with a constant of zero. Instead if I input:
syms x;
int(x+6,x)
The answer is given as (x+6)^2/2, instead of just x^2/2 + 6*x, which almost everything else would do and what I need it to do so I can't set my own integration constants.
Anyone have any help?
I'm trying to do some simple integration in MATLAB (and if your wondering why I don't just do it by hand, it is because I want to implement the same code for a wide variety of functions). The problem is when using int(a) in matlab, it won't integrate a simple linear function such as x+6 with a constant of zero. Instead if I input:
syms x;
int(x+6,x)
The answer is given as (x+6)^2/2, instead of just x^2/2 + 6*x, which almost everything else would do and what I need it to do so I can't set my own integration constants.
Anyone have any help?