⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gm_in.c

📁 MATLAB二维电阻抗断层成像算法!用于医学成像,里面包括有限元剖分正问题,及反问题的算法.并且附有网络剖分数据表!
💻 C
字号:
// gm_in.C,v 1.1.1.1 1995/05/05 01:16:07 vavasis Exp// Copyright (c) 1995 by Cornell University.  All rights reserved.// // This software is written by Stephen A. Vavasis, Department of Computer// Science, Cornell University, Ithaca, NY 14853 USA,// vavasis@cs.cornell.edu.  The algorithm used in the mesh generator is// the result of joint research by S. Mitchell (now at Sandia National// Laboratories) and Vavasis.// // This software and its documentation are distributed for free by// anonymous ftp from ftp.cs.cornell.edu.  Permission is granted for you// to copy this software, use, modify and redistribute it provided that// (a) this copyright notice remains attached in full, (b) if any// modifications are made before redistribution, the modifications are// clearly documented in the redistributed software, and (c) if the// software is redistibuted, then it must redistributed for free.// Please see the file `Copyright' for additional terms.// // IN NO EVENT SHALL CORNELL UNIVERSITY OR THE AUTHOR BE LIABLE TO ANY// PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL// DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,// EVEN IF CORNELL UNIVERSITY OR THE AUTHOR HAS BEEN ADVISED OF THE// POSSIBILITY OF SUCH DAMAGE.// // This software and its documentation have NO WARRANTY of any kind.// There is no implied warranty that this software is fit for any purpose// whatsoever.  Neither the author nor Cornell University have any// obligation to support or maintain this software or provide bug-fixes.// // This is version 1.0 of the software.  Release date 5/5/95.extern "C" { #include "mex.h"#include "tcl.h"}#include "geom.H"#include "memory.H"#include <string.h>extern "C" void mexFunction(int nlhs, Matrix* plhs[], int nrhs,			    Matrix* prhs[]);extern Geom_Obj* geom_typed_obj_in(Tcl_Interp* interp,				   char* instring,				   int& returncode,				   int already_bracketed);int model_error_status;char* model_error_string;void model_error_handler(const char* s) {  mexErrMsgTxt(s);  return;}void (*geom_error_handler)(const char*);int*  geom_error_ptr;void mexFunction(int nlhs, Matrix* plhs[], int nrhs,		 Matrix* prhs[]) {  Geom_Obj* a;  int success;  char* instring;  Tcl_Interp* interp;  int i,j, returncode;  int m, n;  typedef int fptr();  geom_error_handler = &model_error_handler;  geom_error_ptr = &model_error_status;  model_error_status = 0;  if (nrhs != 1)    mexErrMsgTxt("One input args required.");  if (nlhs > 1)    mexErrMsgTxt("Only one output arg produced.");  if (!mxIsString(prhs[0]))     mexErrMsgTxt("Input arg must be a string.");  m = mxGetM(prhs[0]);  n = mxGetN(prhs[0]);  instring = new char[m*n + 2];  mxGetString(prhs[0], instring, n + 1);  interp = Tcl_CreateInterp();  a = geom_typed_obj_in(interp,			instring,			returncode,			0);  Tcl_DeleteInterp(interp);  delete[] instring;  if (returncode != TCL_OK) {    mexPrintf(interp -> result);    mexErrMsgTxt("error reading object");  }  plhs[0] = model_write_chunk(a);  delete a;  return;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -