Works great! NB. seems to be incompatible with new graphics in the 2014b release, hope you can modify it to sense the matlab release and operate accordingly.
5
10 May 2014
Relative Gain Array
Function to calculate the RGA, the General RGA, the Input and Output Effectiveness
Could it be possible that the algorithm isn't complete if n is odd? In that case, I think the formula doesn't take the last subinterval into account.
To see it, you can try:
simpsons(@sin,0,pi,100)
simpsons(@sin,0,pi,101)
simpsons(@sin,0,pi,102)
...
This is great! Just once question. Is there a way to keep the "box" around the figure so as to sort of frame it? Here is my code
function z=graph(x)
a=0.5;
%
xmin=-0.4;
xmax=1.4;
dx=0.01;
%
x=[xmin:dx:xmax];
%
z=x.*(1-x).*(x-a);
%
plot(x,z)
axescenter
Any suggestions would be greatly appreciated. Thanks.
Comment only