MATLAB Answers

Sreet Swastik

I don't get this

Asked by Sreet Swastik
on 29 Mar 2013
global Kp;
>> Kp=5
Kp =
>> global e ; 
>> e = 2;
>> func = Kp*e
    func =
>> q= int(Kp*e, e, 0, 2)

??? Undefined function or method 'int' for input arguments of type 'double'.

  1 Comment

the cyclist
on 29 Mar 2013

In the future, you might want to give your questions a more meaningful title.



No products are associated with this question.

1 Answer

Answer by Walter Roberson
on 29 Mar 2013

int() is a function from the symbolic toolbox, that applies only to symbolic expressions (or character strings that represent symbolic expressions.) I suggest trying

syms e
q = int(Kp*e, e, 0, 2)


Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!