Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
edit1:polygon
%To view plots after 'plot' (and other plot-producing commands) this command must follow: 'print -dpng some_unique_plot_name.png;' %It exports current plot to png image which then is sent to your browser %GNU Octave 4.2.2 n = 7; a = 0.2; k = 0:n-1; x = cos(3*pi/2+pi/n+2*pi*k/n); y = sin(3*pi/2+pi/n+2*pi*k/n); k1 = 1:n; k1(n+1) = 1; function [x1,y1] = f(x,y,n,k1,a) for i = 1:n x1(i) = (x(k1(i+1))-x(k1(i)))*a + x(k1(i)); y1(i) = (y(k1(i+1))-y(k1(i)))*a + y(k1(i)); end end hold on for i = 1:35 plot(x,y,"Linewidth",2,"Color",'b'); plot([x(n),x(1)],[y(n),y(1)],"Linewidth",2,"Color",'b'); [x1,y1] = f(x,y,n,k1,a); x = x1; y = y1; end axis([-1 1 -1 1]); axis off print -dpng saif.png;
run
|
edit
|
history
|
help
0
Test1.m
Test
Delsq
Laplacian
Test
MATRIX MANIPULATIONS
diffusion example carburization of mild steel
test1.m
Delsq
p2