Bonjour tout le monde;
SVP, je n'arrive pas à exécuter sur Octave un script qui pourtant marche correctement sur Matlab. Apparemment, il s'agit d'adapter la forme matricielle à Octave. Merci d'avance:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
P =[];
for r=exp(-3.5:.25:0),%n=-3.5:.25:0 %
% [x,y,z]=cylinder(r,16); P=[P [x(1,:) y(1,:)]]; % Code Matlab
  [x,y,z]=cylinder([r r],16); P=[[] [x(1,:) y(1,:)]];%; P=[P [x(1,:) y(1,:)]]
% [x,y,z]=cylinder(exp(-3.5:.25:0),16); P=[[] [x(1,:) y(1,:)]];%; P=[P [x(1,:) y(1,:)]]
endfor
%P = unique([P'; 0 0], 'rows'); % Code Matlab
P = unique([P'; 0 0], "rows");
%P = unique([[P' [x(1, :) y(1, :)]]; 0 0], "rows");
G = makeLayeredGrid(pebi(triangleGrid(P)), 5);
plotGrid(G, ' FaceColor ' ,[.8 .8 .8 ]); view(30,50) %, axis tight off  %Code Matlab