im trying to convert the code to while loop but im failing to see the mistake
X=[0,10,15,20,22.5,30]
X =
0 10.0000 15.0000 20.0000 22.5000 30.0000
Y=[0,227.04,362.78,517.35,602.97,901.67]
Y =
0 227.0400 362.7800 517.3500 602.9700 901.6700
z(i)=z(i)*(x-X(j))/(X(i)-X(j))
end
z =
0 227.0400 362.7800 1.0000
z =
0 227.0400 362.7800 517.3500
z =
0 227.0400 362.7800 517.3500 1.0000
z =
0 227.0400 362.7800 517.3500 602.9700
X=[0,10,15,20,22.5,30]
X =
0 10.0000 15.0000 20.0000 22.5000 30.0000
Y=[0,227.04,362.78,517.35,602.97,901.67]
Y =
0 227.0400 362.7800 517.3500 602.9700 901.6700
z(i)=z(i)*(x-X(j))/(X(i)-X(j))
end
z =
0 -10.5782 300.4915 1.0000
z =
0 -10.5782 300.4915 0.8000
z =
0 -10.5782 300.4915 0.4800
z =
0 -10.5782 300.4915 0.0960
z =
0 -10.5782 300.4915 0.2496
z =
0 -10.5782 300.4915 0.3494
z =
0 -10.5782 300.4915 180.7828
z =
0 -10.5782 300.4915 180.7828 1.0000
z =
0 -10.5782 300.4915 180.7828 0.7111
z =
0 -10.5782 300.4915 180.7828 0.3413
z =
0 -10.5782 300.4915 180.7828 0.0455
z =
0 -10.5782 300.4915 180.7828 -0.0728
z =
0 -10.5782 300.4915 180.7828 -0.1359
z =
0 -10.5782 300.4915 180.7828 -81.9596
z =
0 -10.5782 300.4915 180.7828 -81.9596 1.0000
z =
0 -10.5782 300.4915 180.7828 -81.9596 0.5333
z =
0 -10.5782 300.4915 180.7828 -81.9596 0.1600
z =
0 -10.5782 300.4915 180.7828 -81.9596 0.0107
z =
0 -10.5782 300.4915 180.7828 -81.9596 -0.0043
z =
0 -10.5782 300.4915 180.7828 -81.9596 0.0037
z =
0 -10.5782 300.4915 180.7828 -81.9596 3.3342