亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sphere.c

?? 這本書是matlab經典書籍
?? C
字號:
/*
 * MATLAB Compiler: 2.2
 * Date: Tue Jun 25 10:53:59 2002
 * Arguments: "-B" "macro_default" "-O" "all" "-O" "fold_scalar_mxarrays:on"
 * "-O" "fold_non_scalar_mxarrays:on" "-O" "optimize_integer_for_loops:on" "-O"
 * "array_indexing:on" "-O" "optimize_conditionals:on" "-B" "sgl" "-m" "-W"
 * "main" "-L" "C" "-t" "-T" "link:exe" "-h" "libmmfile.mlib" "-W" "mainhg"
 * "libmwsglm.mlib" "exm110633_1" 
 */
#include "sphere.h"
#include "libmatlbm.h"
#include "surf.h"

static mxChar _array1_[130] = { 'R', 'u', 'n', '-', 't', 'i', 'm', 'e', ' ',
                                'E', 'r', 'r', 'o', 'r', ':', ' ', 'F', 'i',
                                'l', 'e', ':', ' ', 's', 'p', 'h', 'e', 'r',
                                'e', ' ', 'L', 'i', 'n', 'e', ':', ' ', '1',
                                ' ', 'C', 'o', 'l', 'u', 'm', 'n', ':', ' ',
                                '1', ' ', 'T', 'h', 'e', ' ', 'f', 'u', 'n',
                                'c', 't', 'i', 'o', 'n', ' ', '"', 's', 'p',
                                'h', 'e', 'r', 'e', '"', ' ', 'w', 'a', 's',
                                ' ', 'c', 'a', 'l', 'l', 'e', 'd', ' ', 'w',
                                'i', 't', 'h', ' ', 'm', 'o', 'r', 'e', ' ',
                                't', 'h', 'a', 'n', ' ', 't', 'h', 'e', ' ',
                                'd', 'e', 'c', 'l', 'a', 'r', 'e', 'd', ' ',
                                'n', 'u', 'm', 'b', 'e', 'r', ' ', 'o', 'f',
                                ' ', 'o', 'u', 't', 'p', 'u', 't', 's', ' ',
                                '(', '3', ')', '.' };
static mxArray * _mxarray0_;

static mxChar _array3_[129] = { 'R', 'u', 'n', '-', 't', 'i', 'm', 'e', ' ',
                                'E', 'r', 'r', 'o', 'r', ':', ' ', 'F', 'i',
                                'l', 'e', ':', ' ', 's', 'p', 'h', 'e', 'r',
                                'e', ' ', 'L', 'i', 'n', 'e', ':', ' ', '1',
                                ' ', 'C', 'o', 'l', 'u', 'm', 'n', ':', ' ',
                                '1', ' ', 'T', 'h', 'e', ' ', 'f', 'u', 'n',
                                'c', 't', 'i', 'o', 'n', ' ', '"', 's', 'p',
                                'h', 'e', 'r', 'e', '"', ' ', 'w', 'a', 's',
                                ' ', 'c', 'a', 'l', 'l', 'e', 'd', ' ', 'w',
                                'i', 't', 'h', ' ', 'm', 'o', 'r', 'e', ' ',
                                't', 'h', 'a', 'n', ' ', 't', 'h', 'e', ' ',
                                'd', 'e', 'c', 'l', 'a', 'r', 'e', 'd', ' ',
                                'n', 'u', 'm', 'b', 'e', 'r', ' ', 'o', 'f',
                                ' ', 'i', 'n', 'p', 'u', 't', 's', ' ', '(',
                                '1', ')', '.' };
static mxArray * _mxarray2_;
static mxArray * _mxarray4_;
static mxArray * _mxarray5_;
static mxArray * _mxarray6_;
static mxArray * _mxarray7_;
static mxArray * _mxarray8_;

void InitializeModule_sphere(void) {
    _mxarray0_ = mclInitializeString(130, _array1_);
    _mxarray2_ = mclInitializeString(129, _array3_);
    _mxarray4_ = mclInitializeDouble(20.0);
    _mxarray5_ = mclInitializeDouble(2.0);
    _mxarray6_ = mclInitializeDouble(3.141592653589793);
    _mxarray7_ = mclInitializeDouble(0.0);
    _mxarray8_ = mclInitializeDouble(1.0);
}

void TerminateModule_sphere(void) {
    mxDestroyArray(_mxarray8_);
    mxDestroyArray(_mxarray7_);
    mxDestroyArray(_mxarray6_);
    mxDestroyArray(_mxarray5_);
    mxDestroyArray(_mxarray4_);
    mxDestroyArray(_mxarray2_);
    mxDestroyArray(_mxarray0_);
}

static mxArray * Msphere(mxArray * * yy,
                         mxArray * * zz,
                         int nargout_,
                         mxArray * n);

_mexLocalFunctionTable _local_function_table_sphere
  = { 0, (mexFunctionTableEntry *)NULL };

/*
 * The function "mlfNSphere" contains the nargout interface for the "sphere"
 * M-function from file "d:\MATLAB6p1\toolbox\matlab\specgraph\sphere.m" (lines
 * 1-35). This interface is only produced if the M-function uses the special
 * variable "nargout". The nargout interface allows the number of requested
 * outputs to be specified via the nargout argument, as opposed to the normal
 * interface which dynamically calculates the number of outputs based on the
 * number of non-NULL inputs it receives. This function processes any input
 * arguments and passes them to the implementation version of the function,
 * appearing above.
 */
mxArray * mlfNSphere(int nargout, mxArray * * yy, mxArray * * zz, mxArray * n) {
    mxArray * xx = mclGetUninitializedArray();
    mxArray * yy__ = mclGetUninitializedArray();
    mxArray * zz__ = mclGetUninitializedArray();
    mlfEnterNewContext(2, 1, yy, zz, n);
    xx = Msphere(&yy__, &zz__, nargout, n);
    mlfRestorePreviousContext(2, 1, yy, zz, n);
    if (yy != NULL) {
        mclCopyOutputArg(yy, yy__);
    } else {
        mxDestroyArray(yy__);
    }
    if (zz != NULL) {
        mclCopyOutputArg(zz, zz__);
    } else {
        mxDestroyArray(zz__);
    }
    return mlfReturnValue(xx);
}

/*
 * The function "mlfSphere" contains the normal interface for the "sphere"
 * M-function from file "d:\MATLAB6p1\toolbox\matlab\specgraph\sphere.m" (lines
 * 1-35). This function processes any input arguments and passes them to the
 * implementation version of the function, appearing above.
 */
mxArray * mlfSphere(mxArray * * yy, mxArray * * zz, mxArray * n) {
    int nargout = 1;
    mxArray * xx = mclGetUninitializedArray();
    mxArray * yy__ = mclGetUninitializedArray();
    mxArray * zz__ = mclGetUninitializedArray();
    mlfEnterNewContext(2, 1, yy, zz, n);
    if (yy != NULL) {
        ++nargout;
    }
    if (zz != NULL) {
        ++nargout;
    }
    xx = Msphere(&yy__, &zz__, nargout, n);
    mlfRestorePreviousContext(2, 1, yy, zz, n);
    if (yy != NULL) {
        mclCopyOutputArg(yy, yy__);
    } else {
        mxDestroyArray(yy__);
    }
    if (zz != NULL) {
        mclCopyOutputArg(zz, zz__);
    } else {
        mxDestroyArray(zz__);
    }
    return mlfReturnValue(xx);
}

/*
 * The function "mlfVSphere" contains the void interface for the "sphere"
 * M-function from file "d:\MATLAB6p1\toolbox\matlab\specgraph\sphere.m" (lines
 * 1-35). The void interface is only produced if the M-function uses the
 * special variable "nargout", and has at least one output. The void interface
 * function specifies zero output arguments to the implementation version of
 * the function, and in the event that the implementation version still returns
 * an output (which, in MATLAB, would be assigned to the "ans" variable), it
 * deallocates the output. This function processes any input arguments and
 * passes them to the implementation version of the function, appearing above.
 */
void mlfVSphere(mxArray * n) {
    mxArray * xx = NULL;
    mxArray * yy = NULL;
    mxArray * zz = NULL;
    mlfEnterNewContext(0, 1, n);
    xx = Msphere(&yy, &zz, 0, n);
    mlfRestorePreviousContext(0, 1, n);
    mxDestroyArray(xx);
    mxDestroyArray(yy);
    mxDestroyArray(zz);
}

/*
 * The function "mlxSphere" contains the feval interface for the "sphere"
 * M-function from file "d:\MATLAB6p1\toolbox\matlab\specgraph\sphere.m" (lines
 * 1-35). The feval function calls the implementation version of sphere through
 * this function. This function processes any input arguments and passes them
 * to the implementation version of the function, appearing above.
 */
void mlxSphere(int nlhs, mxArray * plhs[], int nrhs, mxArray * prhs[]) {
    mxArray * mprhs[1];
    mxArray * mplhs[3];
    int i;
    if (nlhs > 3) {
        mlfError(_mxarray0_);
    }
    if (nrhs > 1) {
        mlfError(_mxarray2_);
    }
    for (i = 0; i < 3; ++i) {
        mplhs[i] = mclGetUninitializedArray();
    }
    for (i = 0; i < 1 && i < nrhs; ++i) {
        mprhs[i] = prhs[i];
    }
    for (; i < 1; ++i) {
        mprhs[i] = NULL;
    }
    mlfEnterNewContext(0, 1, mprhs[0]);
    mplhs[0] = Msphere(&mplhs[1], &mplhs[2], nlhs, mprhs[0]);
    mlfRestorePreviousContext(0, 1, mprhs[0]);
    plhs[0] = mplhs[0];
    for (i = 1; i < 3 && i < nlhs; ++i) {
        plhs[i] = mplhs[i];
    }
    for (; i < 3; ++i) {
        mxDestroyArray(mplhs[i]);
    }
}

/*
 * The function "Msphere" is the implementation version of the "sphere"
 * M-function from file "d:\MATLAB6p1\toolbox\matlab\specgraph\sphere.m" (lines
 * 1-35). It contains the actual compiled code for that M-function. It is a
 * static function and must only be called from one of the interface functions,
 * appearing below.
 */
/*
 * function [xx,yy,zz] = sphere(n)
 */
static mxArray * Msphere(mxArray * * yy,
                         mxArray * * zz,
                         int nargout_,
                         mxArray * n) {
    mexLocalFunctionTable save_local_function_table_
      = mclSetCurrentLocalFunctionTable(&_local_function_table_sphere);
    int nargin_ = mclNargin(1, n, NULL);
    mxArray * xx = mclGetUninitializedArray();
    mxArray * ans = mclGetUninitializedArray();
    mxArray * z = mclGetUninitializedArray();
    mxArray * y = mclGetUninitializedArray();
    mxArray * x = mclGetUninitializedArray();
    mxArray * sintheta = mclGetUninitializedArray();
    mxArray * cosphi = mclGetUninitializedArray();
    mxArray * phi = mclGetUninitializedArray();
    mxArray * theta = mclGetUninitializedArray();
    mclCopyArray(&n);
    /*
     * %SPHERE Generate sphere.
     * %   [X,Y,Z] = SPHERE(N) generates three (N+1)-by-(N+1)
     * %   matrices so that SURF(X,Y,Z) produces a unit sphere.
     * %
     * %   [X,Y,Z] = SPHERE uses N = 20.
     * %
     * %   SPHERE(N) and just SPHERE graph the sphere as a SURFACE
     * %   and do not return anything.
     * %
     * %   See also ELLIPSOID, CYLINDER.
     * 
     * %   Clay M. Thompson 4-24-91, CBM 8-21-92.
     * %   Copyright 1984-2001 The MathWorks, Inc. 
     * %   $Revision: 5.7 $  $Date: 2001/04/15 12:03:55 $
     * 
     * if nargin == 0, n = 20; end
     */
    if (nargin_ == 0) {
        mlfAssign(&n, _mxarray4_);
    }
    /*
     * 
     * % -pi <= theta <= pi is a row vector.
     * % -pi/2 <= phi <= pi/2 is a column vector.
     * theta = (-n:2:n)/n*pi;
     */
    mlfAssign(
      &theta,
      mclMtimes(
        mclMrdivide(
          mlfColon(mclUminus(mclVa(n, "n")), _mxarray5_, mclVa(n, "n")),
          mclVa(n, "n")),
        _mxarray6_));
    /*
     * phi = (-n:2:n)'/n*pi/2;
     */
    mlfAssign(
      &phi,
      mclMrdivide(
        mclMtimes(
          mclMrdivide(
            mlfCtranspose(
              mlfColon(mclUminus(mclVa(n, "n")), _mxarray5_, mclVa(n, "n"))),
            mclVa(n, "n")),
          _mxarray6_),
        _mxarray5_));
    /*
     * cosphi = cos(phi); cosphi(1) = 0; cosphi(n+1) = 0;
     */
    mlfAssign(&cosphi, mlfCos(mclVv(phi, "phi")));
    mclIntArrayAssign1(&cosphi, _mxarray7_, 1);
    mclArrayAssign1(&cosphi, _mxarray7_, mclPlus(mclVa(n, "n"), _mxarray8_));
    /*
     * sintheta = sin(theta); sintheta(1) = 0; sintheta(n+1) = 0;
     */
    mlfAssign(&sintheta, mlfSin(mclVv(theta, "theta")));
    mclIntArrayAssign1(&sintheta, _mxarray7_, 1);
    mclArrayAssign1(&sintheta, _mxarray7_, mclPlus(mclVa(n, "n"), _mxarray8_));
    /*
     * 
     * x = cosphi*cos(theta);
     */
    mlfAssign(
      &x,
      mclMtimes(mclVv(cosphi, "cosphi"), mclVe(mlfCos(mclVv(theta, "theta")))));
    /*
     * y = cosphi*sintheta;
     */
    mlfAssign(
      &y, mclMtimes(mclVv(cosphi, "cosphi"), mclVv(sintheta, "sintheta")));
    /*
     * z = sin(phi)*ones(1,n+1);
     */
    mlfAssign(
      &z,
      mclMtimes(
        mclVe(mlfSin(mclVv(phi, "phi"))),
        mclVe(mlfOnes(_mxarray8_, mclPlus(mclVa(n, "n"), _mxarray8_), NULL))));
    /*
     * 
     * if nargout == 0
     */
    if (nargout_ == 0) {
        /*
         * surf(x,y,z)
         */
        mclPrintAns(
          &ans, mlfNSurf(0, mclVv(x, "x"), mclVv(y, "y"), mclVv(z, "z"), NULL));
    /*
     * else
     */
    } else {
        /*
         * xx = x; yy = y; zz = z;
         */
        mlfAssign(&xx, mclVsv(x, "x"));
        mlfAssign(yy, mclVsv(y, "y"));
        mlfAssign(zz, mclVsv(z, "z"));
    /*
     * end
     */
    }
    mclValidateOutput(xx, 1, nargout_, "xx", "sphere");
    mclValidateOutput(*yy, 2, nargout_, "yy", "sphere");
    mclValidateOutput(*zz, 3, nargout_, "zz", "sphere");
    mxDestroyArray(theta);
    mxDestroyArray(phi);
    mxDestroyArray(cosphi);
    mxDestroyArray(sintheta);
    mxDestroyArray(x);
    mxDestroyArray(y);
    mxDestroyArray(z);
    mxDestroyArray(ans);
    mxDestroyArray(n);
    mclSetCurrentLocalFunctionTable(save_local_function_table_);
    return xx;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品一区二区三区四区| 色噜噜夜夜夜综合网| 精品一区二区三区视频在线观看| 国产成a人亚洲| 欧美日韩精品三区| 中文字幕乱码久久午夜不卡 | 日本道精品一区二区三区| 欧美在线综合视频| 国产日产欧美一区| 日韩精品福利网| 欧美在线你懂的| 亚洲欧洲另类国产综合| 韩国三级中文字幕hd久久精品| 欧美在线999| 中文字幕制服丝袜成人av| 韩国精品一区二区| 7777精品伊人久久久大香线蕉最新版 | 亚洲综合小说图片| 国产成人自拍高清视频在线免费播放| 欧美日韩成人一区| 亚洲综合色丁香婷婷六月图片| eeuss鲁一区二区三区| 国产亚洲欧美激情| 久久国产精品72免费观看| 欧美日韩电影一区| 亚洲五月六月丁香激情| www.在线成人| 国产精品无圣光一区二区| 久久99精品久久久| 日韩一区二区三区电影| 亚洲va在线va天堂| 欧美性xxxxxx少妇| 亚洲一区在线观看视频| 欧洲国内综合视频| 亚洲国产视频直播| 欧美日韩免费电影| 午夜电影网亚洲视频| 欧美日韩国产另类不卡| 午夜精品视频一区| 欧美一区二区三区色| 日韩精品一区第一页| 日韩一区二区三区精品视频| 九九**精品视频免费播放| 久久九九久久九九| 成人激情黄色小说| 亚洲三级电影网站| 欧美亚洲综合一区| 免费精品视频在线| 欧美精品一区视频| 波多野结衣欧美| 亚洲一区二区三区四区在线免费观看 | 99久久精品国产一区| 亚洲乱码日产精品bd| 欧美日韩中文一区| 美女网站色91| 国产精品视频一二三| 色94色欧美sute亚洲线路一ni| 亚洲成av人综合在线观看| 欧美一二三区在线观看| 国产69精品久久久久毛片 | 色综合天天性综合| 亚洲一区在线视频观看| 日韩视频一区二区三区 | 欧美三级欧美一级| 久久精品国产精品青草| 国产欧美一区二区精品仙草咪| 91丨九色丨蝌蚪富婆spa| 石原莉奈一区二区三区在线观看| 久久嫩草精品久久久久| 色av成人天堂桃色av| 国内精品免费**视频| 亚洲女性喷水在线观看一区| 欧美一区二区网站| 成人久久18免费网站麻豆| 日日夜夜一区二区| 国产精品免费视频一区| 91精品婷婷国产综合久久性色| 国产精品18久久久久久久久| 午夜精品一区在线观看| 国产日韩精品一区二区三区| 欧美精品丝袜久久久中文字幕| 懂色av中文一区二区三区| 日本在线播放一区二区三区| 国产精品国产三级国产普通话三级| 欧美一级在线观看| 一本一道久久a久久精品综合蜜臀| 美国毛片一区二区| 午夜婷婷国产麻豆精品| 亚洲欧美综合另类在线卡通| 精品入口麻豆88视频| 欧美日韩免费电影| 99国产欧美久久久精品| 国产美女在线精品| 美女网站在线免费欧美精品| 亚洲在线免费播放| 国产精品国产三级国产普通话蜜臀| 精品日韩在线一区| 欧美群妇大交群中文字幕| 99久久99精品久久久久久| 国产麻豆视频精品| 美日韩一级片在线观看| 日韩av电影免费观看高清完整版在线观看| 亚洲欧洲无码一区二区三区| 欧美国产在线观看| 久久久亚洲精华液精华液精华液| 91精品国产综合久久久久久久| 欧美日韩成人一区二区| 欧美私模裸体表演在线观看| 日本精品视频一区二区| av资源网一区| 91在线国内视频| 成人激情免费视频| 国产成人免费在线观看| 国产老妇另类xxxxx| 精品一区二区三区欧美| 麻豆一区二区三| 美国十次了思思久久精品导航| 久久精品国产77777蜜臀| 日本在线播放一区二区三区| 美国十次了思思久久精品导航| 美脚の诱脚舐め脚责91| 国产一区二区不卡| 国产精品综合二区| 盗摄精品av一区二区三区| 风流少妇一区二区| 99精品欧美一区二区蜜桃免费| 91原创在线视频| 欧美性videosxxxxx| 在线播放一区二区三区| 日韩小视频在线观看专区| 久久久久久久综合狠狠综合| 欧美韩国一区二区| 亚洲日本va午夜在线影院| 亚洲综合一二区| 奇米影视7777精品一区二区| 国产美女精品一区二区三区| eeuss鲁一区二区三区| 精品视频999| 日韩欧美精品三级| 国产精品色呦呦| 亚洲资源在线观看| 美女视频网站黄色亚洲| 成人一级片在线观看| 色哟哟国产精品免费观看| 538在线一区二区精品国产| 精品欧美久久久| 亚洲老妇xxxxxx| 美女视频一区二区| av亚洲精华国产精华精华| 3d成人动漫网站| 欧美韩国日本不卡| 视频一区在线播放| 国产成人在线免费观看| 欧美视频一区二区在线观看| 精品剧情v国产在线观看在线| 亚洲男人天堂av网| 麻豆国产欧美一区二区三区| av在线不卡电影| 欧美成人乱码一区二区三区| 亚洲精品成人在线| 国产真实乱子伦精品视频| 91在线播放网址| 久久久久久综合| 亚洲在线视频网站| 国产高清久久久| 538prom精品视频线放| 亚洲色大成网站www久久九九| 久久 天天综合| 欧美人xxxx| 伊人性伊人情综合网| 国内外成人在线| 欧美精品123区| 亚洲精品国产精华液| 国产999精品久久久久久绿帽| 欧美精品日韩综合在线| 国产精品每日更新在线播放网址| 久草精品在线观看| 欧美日韩高清在线| 一片黄亚洲嫩模| 99riav久久精品riav| 国产日韩在线不卡| 久久99精品国产麻豆不卡| 9191国产精品| 亚洲夂夂婷婷色拍ww47| 91影视在线播放| 国产精品久久久久一区| 国产高清精品在线| 精品成人在线观看| 免费观看在线色综合| 欧美精品久久久久久久久老牛影院 | 婷婷一区二区三区| 日本福利一区二区| 成人免费一区二区三区在线观看| 青青草91视频| 91精品久久久久久久久99蜜臂| 一区二区不卡在线播放 | 26uuu亚洲综合色| 麻豆高清免费国产一区| 欧美一级久久久| 男女性色大片免费观看一区二区|