I ordinarily can resolve my MATLAB errors with lots of googling and a bit of trial and error, but this one has me particularly stumped.
I hope this doesn’t run afoul of the homework rules here, but this is a small aspect of a larger project. And in any case, I’m supposed to be learning about control systems analysis, not MATLAB. I would liken it to asking about the details of a calculator whilst doing math homework. I’m not, repeat NOT, asking about control systems here. MATLAB is the tool, not the homework.
Disclaimer aside, here goes:
My goal is to plot the unit step response of a unity feedback amplifier, with open loop gain, G = k/((3s+1)(2*s+1)), for k=10. The code looks like this:
k=10;
G=k/((2*s+1)*(3*s+1));
T=G/(1+G);
C=ilaplace(T/s);
figure (4)
ezplot(C)
This works perfectly. However, when I move on to step 2, adding another pole at s=100, is when the shit hits the fan. Here’s my code:
k=10;
G=k/((2*s+1)*(3*s+1)*(1+s/100));
T=G/(1+G);
D=ilaplace(T/s);
figure (5)
ezplot(D)
I get all sorts of errors, starting with inlineeval:
??? Error using ==> inlineeval
Error in inline expression ==> -1000./121524455857.*sum((27047643+61502320.*_alpha+612012.*_alpha.^2).*exp(_alpha.*t),_alpha = RootOf(605.*_Z.^2+501.*_Z+1100+6.*_Z.^3))
??? Error: The input character is not valid in MATLAB statements or expressions.
Error in ==> inline.feval at 34
INLINE_OUT_ = inlineeval(INLINE_INPUTS_, INLINE_OBJ_.inputExpr, INLINE_OBJ_.expr);
Error in ==> specgraph\private\ezplotfeval at 54
z = feval(f,x(1));
Error in ==> ezplot>ezplot1 at 448
[y,f,loopflag] = ezplotfeval(f,x);
Error in ==> ezplot at 148
[hp,cax] = ezplot1(cax,f{1},vars,labels,args{:});
Error in ==> sym.ezplot at 46
h = ezplot(f.s);
Error in ==> Project2 at 70
ezplot(D)
I’ve since decided that this occurs whenever I add a third pole to the system, no matter what it is. Why would simply adding a third pole cause built-in MATLAB functions to stop working?