Difference between revisions of "Support:Documents:Examples:Instructions for Adding Your Own Example"

From COMKAT wiki
Jump to navigation Jump to search
(New page: Write some introduction to your example here. <pre> For text that you want to appear as part of a MATLAB function or program, encase it inside a "pre" block. Line 2 of pre block Line ...)
 
Line 9: Line 9:
  
 
Remember to include figures and plots in your example to make it look pretty and convey information.
 
Remember to include figures and plots in your example to make it look pretty and convey information.
To insert a figure, create a figure file in png (preferred) or other graphic format.  Next, upload the image giving it a unique name.  Use double-square  
+
To insert a figure, create a figure file in png (preferred) or other graphic format.   
 +
 
 +
<pre>
 +
figure
 +
plot(1:10)
 +
title('Example Figure')
 +
ylabel('y-axis label')
 +
xlabel('x-axis label')
 +
print -dpng ExampleFigure.png
 +
 
 +
</pre>
 +
 
 +
 
 +
Next, upload the image giving it a unique name.  Use double-square  
 
[[Image:Example.png]]
 
[[Image:Example.png]]
 +
 +
 +
 +
[[Image:ExampleFigure.png]]

Revision as of 21:37, 3 March 2008

Write some introduction to your example here.

For text that you want to appear as part of a MATLAB function or program, encase it inside a "pre" block.
Line 2 of pre block
    Line 3 (indented) of pre block.


Remember to include figures and plots in your example to make it look pretty and convey information. To insert a figure, create a figure file in png (preferred) or other graphic format.

figure
plot(1:10)
title('Example Figure')
ylabel('y-axis label')
xlabel('x-axis label')
print -dpng ExampleFigure.png


Next, upload the image giving it a unique name. Use double-square Example.png


ExampleFigure.png