Quelltext einbinden: Unterschied zwischen den Versionen

Aus HSHL Mechatronik
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „Kategorie:How to Um Quelltext einzubinden benutzt man folgenden Syntax: <code> <nowiki><code> ... </code></nowiki> </code> Um Text von der Wiki-Markup a…“)
 
Keine Bearbeitungszusammenfassung
Zeile 8: Zeile 8:


<code> <nowiki>  <nowiki> ... </nowiki> </nowiki> </code>
<code> <nowiki>  <nowiki> ... </nowiki> </nowiki> </code>
== Beispiele ==
<source line lang="matlab">
for i=1:10
%    try
%        image = CAMERA_DumpFrame(s);     
%    catch err
%        error('MATLAB:RWTHMindstormsNXT:Sensor:unknown', 'An unknown Error occured while fetching the image. Please check that the Camera is connected and try again');
%    end
    image = CAMERA_GetImage(com);
    handle = imshow(image);
    %pause(0.1)
    currTime(i) = toc(startTime);
    disp(['Aktuelle Zeit: ',num2str(currTime(i))])
    %imwrite(image,sprintf('NXTCamImage%03d.png',i));
    %imwrite(img,fullfile(workingDir,sprintf('HexBug%03d.png',n)));
    % ca. alle 4.8 Sekunden ein Bild
end;
</source>
<syntaxhighlight lang="matlab">
<for i=1:10
%    try
%        image = CAMERA_DumpFrame(s);     
%    catch err
%        error('MATLAB:RWTHMindstormsNXT:Sensor:unknown', 'An unknown Error occured while fetching the image. Please check that the Camera is connected and try again');
%    end
    image = CAMERA_GetImage(com);
    handle = imshow(image);
    %pause(0.1)
    currTime(i) = toc(startTime);
    disp(['Aktuelle Zeit: ',num2str(currTime(i))])
    %imwrite(image,sprintf('NXTCamImage%03d.png',i));
    %imwrite(img,fullfile(workingDir,sprintf('HexBug%03d.png',n)));
    % ca. alle 4.8 Sekunden ein Bild
end;>
</syntaxhighlight>
== Weiterführende links ==
*[http://de.wikipedia.org/wiki/Hilfe:Syntaxhighlight| Syntaxhighlight]

Version vom 10. Mai 2014, 10:55 Uhr


Um Quelltext einzubinden benutzt man folgenden Syntax:

<code> ... </code>

Um Text von der Wiki-Markup auszuschließen benutzt man folgenden Syntax:

<nowiki> ... </nowiki>

Beispiele

for i=1:10 
%     try
%         image = CAMERA_DumpFrame(s);       
%     catch err
%         error('MATLAB:RWTHMindstormsNXT:Sensor:unknown', 'An unknown Error occured while fetching the image. Please check that the Camera is connected and try again');
%     end
    image = CAMERA_GetImage(com);
    handle = imshow(image);
    %pause(0.1)
    currTime(i) = toc(startTime);
    disp(['Aktuelle Zeit: ',num2str(currTime(i))])
    %imwrite(image,sprintf('NXTCamImage%03d.png',i));
    %imwrite(img,fullfile(workingDir,sprintf('HexBug%03d.png',n)));
    % ca. alle 4.8 Sekunden ein Bild
end;
<for i=1:10 
%     try
%         image = CAMERA_DumpFrame(s);       
%     catch err
%         error('MATLAB:RWTHMindstormsNXT:Sensor:unknown', 'An unknown Error occured while fetching the image. Please check that the Camera is connected and try again');
%     end
    image = CAMERA_GetImage(com);
    handle = imshow(image);
    %pause(0.1)
    currTime(i) = toc(startTime);
    disp(['Aktuelle Zeit: ',num2str(currTime(i))])
    %imwrite(image,sprintf('NXTCamImage%03d.png',i));
    %imwrite(img,fullfile(workingDir,sprintf('HexBug%03d.png',n)));
    % ca. alle 4.8 Sekunden ein Bild
end;>

Weiterführende links