bonjour
Quand j'introduis ce code dans un autre qui demande un fichier d'entrée de geométrie : il sert à ploter un cylindre en se basant sur son équation paramètrique ( sans utiliser la fonction cylinder de matlab) , ca ne marche pas . quand je met le mode «debuger» , je ne vois pas vraiment ce qui ne va pas. Voici le code .
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 close all % initialize the grid radius=2; color='w'; length=100; z=0:.01:length; theta=0:2*pi; [z,theta]=meshgrid(z,theta); % % calculate x and y x=radius*cos(theta); y=radius*sin(theta); % fh = figure ; set(fh,'numbertitle','off','color','w') ; % axis([-1.1*radius 1.1*radius -1.1*radius 1.1*radius 0. 1*length]) % % plot the mesh plot3(x,y,z) % % grid and box grid on box on % axis equal
Proposez vous moi un truc à modifiier?
Merci.
Partager