fix online help examples
Pierre Marechal [Tue, 19 Feb 2008 16:54:19 +0000 (16:54 +0000)]
scilab/modules/graphic_export/help/en_US/xs2ps.xml
scilab/modules/graphics/demos/fec/fec.ex1 [new file with mode: 0644]
scilab/modules/graphics/help/en_US/set_posfig_dim.xml
scilab/modules/sound/help/en_US/wavread.xml

index 11af178..9f2563f 100644 (file)
     generated postscript file does not contrains the header part</P>
   </DESCRIPTION>
 
-  <EXAMPLE><![CDATA[ 
-    scf(0)
-    plot2d()
-    // Postcript export
-    filename='foo'; // ! no extension
-    xs2ps(0,filename)
-    //add the Postscript file header and create <filename>.eps file
-    if MSDOS then
-      unix_s(pathconvert('""'+WSCI+'/bin/BEpsf'+'""',%f)+' -p ' +filename)
-    else
-      unix_s(pathconvert('SCI/bin/BEpsf',%f)+' -p ' +filename)
-    end
-    // Gif export
-    xs2gif(0,'foo.gif')
-    // ppm export
-    xs2ppm(0,'foo.ppm')
-  ]]></EXAMPLE>
+<EXAMPLE><![CDATA[
+scf(0);
+plot2d();
+// Postcript export
+filename='foo.ps';
+xs2ps(0,filename)
+// Gif export
+xs2gif(0,'foo.gif');
+// ppm export
+xs2ppm(0,'foo.ppm');
+]]></EXAMPLE>
 
   <SEE_ALSO>
     <SEE_ALSO_ITEM>
diff --git a/scilab/modules/graphics/demos/fec/fec.ex1 b/scilab/modules/graphics/demos/fec/fec.ex1
new file mode 100644 (file)
index 0000000..379fb57
--- /dev/null
@@ -0,0 +1,34 @@
+//
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) INRIA
+// Copyright (C) ENPC
+//
+// This file is distributed under the same license as the Scilab package.
+//
+
+mode(0)
+path=get_absolute_file_path('fec.ex1');
+getf(path+'fec_demo.sci');
+xbasc();
+xset("colormap",jetcolormap(128));
+new_style = get("figure_style")=="new";
+
+N=20;
+n=1:N;
+x=cos(n*2*%pi/N);
+y=sin(n*2*%pi/N);
+noeuds=N;
+noeul=[(1:(N))',x',y',0*ones(N,1)];
+noeul=[noeul;(N+1),0,0,0];
+trianl=[];
+for i=1:(N-1),trianl=[trianl;i,i,i+1,N+1,0];end
+trianl=[trianl;N,N,1,N+1,0];
+triang=N;
+rect=[-1.2,-1.2,1.2,1.2];
+if new_style then, drawlater(), end
+fec(noeul(:,2),noeul(:,3),trianl,(1:N+1)',"030"," ",rect);
+meshvisu(3,rect);
+if new_style then, drawnow(), end
+xselect();
+
+mode(-1)
index 223a81f..434c640 100644 (file)
     <VERB>w=600</VERB>, <VERB>h=424</VERB>.</P>
   </DESCRIPTION>
 
-  <EXAMPLE><![CDATA[ 
-    // make a figure with a specific shape 
-    f=scf(0);f.figure_size=[800,300];
-    plot2d()
-    set_posfig_dim(f.figure_size(1),f.figure_size(2))
-    filename='foo'; // ! no extension
-    xs2ps(0,filename)
-    //add the Postscript file header and create <filename>.eps file
-    if MSDOS then
-      unix_s(pathconvert('""'+WSCI+'/bin/BEpsf'+'""',%f)+' -p ' +filename)
-    else
-      unix_s(pathconvert('SCI/bin/BEpsf',%f)+' -p ' +filename)
-    end
-    
-  ]]></EXAMPLE>
+<EXAMPLE><![CDATA[ 
+// make a figure with a specific shape
+f=scf(0);f.figure_size=[800,300];
+plot2d();
+set_posfig_dim(f.figure_size(1),f.figure_size(2));
+filename='foo.ps';
+xs2ps(0,filename);
+]]></EXAMPLE>
 
   <SEE_ALSO>
     <SEE_ALSO_ITEM>
index a218aff..fcde47b 100644 (file)
@@ -68,7 +68,7 @@ subplot(2,1,1)
 plot2d(y(1,:)) // first channel 
 subplot(2,1,2)
 plot2d(y(2,:)) // second channel
-y=wavread("SCI/demos/signal/sound/chimes.wav",[1 5]) //the first five samples
+y=wavread("SCI/modules/sound/demos/chimes.wav",[1 5]) //the first five samples
 ]]>
   </EXAMPLE>
   <SEE_ALSO>