// Scilab code for plotting for various p-norms
// developed by Jit/Vatsal/other TAs of EE636 course in Spring (Jan23-April23)
// check in https://cloud.scilab.in/

x=-1:0.02:1; // to get various points (the good accuracy)
// semicolon at the end suppresses display of output

p=7 // also try p=0.5 and p=0.2
y3=nthroot(1-abs(x).^p,p);
y4=-nthroot(1-abs(x).^p,p);

plot(x,y3,x,y4)
title('p-norm (even if it does not satisfy norm-axioms??!!, p=5')
xlabel('x')
ylabel('y')

