I am trying to draw a squircle with a given height and width as I need to approximate a rounded rectangle using a function. I have tried to use both equations for a squircle that wikipedia has recomended and while I think I would prefer the Fernández-Guasti squircle I have gotten further with the ellipse based squircle (which I can also get to work on Mathematica) but the best plot I have gotten so far resembles an exponential decay. The input I'm using at this point is below...
W=2.65;H=4.91;
x=linspace(0,2.65,360);
y=(1-(x./(W/2)).^(1/4)).*(H/2);
plot (x,y)