MATLAB COMPILER RELEASE NOTES Uživatelská příručka Strana 146

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 264
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 145
5 Controlling Code Generation
5-30
012345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
for (mclForStart(
&viter__, mlfScalar(1), mclVa(numPoints, "numPoints"), NULL);
mclForNext(&viter__, &i);
) {
/*
* startPoint = floor((corners(theRand(i),:)+startPoint)/2);
*/
mlfAssign(
&startPoint,
mlfFloor(
mclMrdivide(
mclPlus(
mclVe(
mlfIndexRef(
mclVsv(corners, "corners"),
"(?,?)",
mlfIndexRef(
mclVsv(theRand, "theRand"), "(?)", mclVsv(i, "i")),
mlfCreateColonIndex())),
mclVv(startPoint, "startPoint")),
mlfScalar(2))));
.
.
.
Page Width = 40
This example specifies a page width of 40.
mcc -x -F page-width:40 gasket
The segment of generated code is
012345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
mlfAssign(
&theImage,
mlfZeros(
mlfScalar(1000),
mlfScalar(1000),
NULL));
/*
*
* corners = [866 1;1 500;866 1000];
*/
mlfAssign(
Zobrazit stránku 145
1 2 ... 141 142 143 144 145 146 147 148 149 150 151 ... 263 264

Komentáře k této Příručce

Žádné komentáře