Quelltext einbinden: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Keine Bearbeitungszusammenfassung |
|||
Zeile 22: | Zeile 22: | ||
=== <nowiki> <source>-Umbebung </nowiki> === | === <nowiki> <source>-Umbebung </nowiki> === | ||
<nowiki><source line lang="matlab" style="font-size:medium"></nowiki> | |||
<source line lang="matlab" style="font-size:medium"> | <source line lang="matlab" style="font-size:medium"> | ||
for i=1:10 | for i=1:10 | ||
Zeile 41: | Zeile 42: | ||
=== <nowiki> <syntaxhighlight> </nowiki> === | === <nowiki> <syntaxhighlight> </nowiki> === | ||
<nowiki> <syntaxhighlight lang="matlab" style="border: none; background-color: #EFF1C1; font-size:larger"> </nowiki> | |||
<syntaxhighlight lang="matlab" style="border: none; background-color: #EFF1C1; font-size:larger"> | <syntaxhighlight lang="matlab" style="border: none; background-color: #EFF1C1; font-size:larger"> | ||
for i=1:10 | for i=1:10 | ||
Zeile 58: | Zeile 60: | ||
end; | end; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<nowiki><syntaxhighlight lang="matlab" style="background-color: #EFF1C1; font-size:larger"></nowiki> | |||
<syntaxhighlight lang="matlab" style="background-color: #EFF1C1; font-size:larger"> | <syntaxhighlight lang="matlab" style="background-color: #EFF1C1; font-size:larger"> |
Version vom 21. Mai 2014, 15:54 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
<code>-Umgebung
for i=1:10
image = CAMERA_GetImage(com);
handle = imshow(image);
%pause(0.1)
currTime(i) = toc(startTime);
disp(['Aktuelle Zeit: ',num2str(currTime(i))])
end;
<source>-Umbebung
<source line lang="matlab" style="font-size:medium">
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>
<syntaxhighlight lang="matlab" style="border: none; background-color: #EFF1C1; font-size:larger">
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 lang="matlab" style="background-color: #EFF1C1; font-size:larger">
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;