(C-mexfilesforMATLABencounterthefollowingproblemwhencompilingthemwithWATCOM11.0:Allaccess-functionstofiles(fprintf,fscanf)cannothandledoublevariables,onlyintegerandstringsarereadorwrittencorrectly.Thefileconvert.ccontainstwofunctions:Youmayreadadouble-variableasastringfromthefileandconvertittoadouble(functionstring2double)andyoumayconvertadoubletoastring(functiondouble2string)andwriteittoafile(seemain()inconvert.c).Thefileconditio.datisanexampleofnumbersreadbyconvert.c.Theconv.exewascompiledonaWindows95-system.ThefilesweretestedforMATLAB5.2andWATCOM11.0aresultof"ver"is:MATLABVersion5.2.1.1420onPCWIN) - IMDN开发者社群-imdn.cn">
登录
首页 » C++ Builder » BerndHafner

BerndHafner

于 2009-12-23 发布 文件大小:34KB
0 96
下载积分: 1 下载次数: 3

代码说明:

  C-mex files for MATLAB encounter the following problem when compiling them with WATCOM 11.0: All access-functions to files (fprintf, fscanf) cannot handle double variables, only integer and strings are read or written correctly. The file convert.c contains two functions: You may read a double-variable as a string from the file and convert it to a double (function string2double) and you may convert a double to a string (function double2string) and write it to a file (see main() in convert.c). The file conditio.dat is an example of numbers read by convert.c. The conv.exe was compiled on a Windows95-system. The files were tested for MATLAB 5.2 and WATCOM 11.0a result of "ver" is: MATLAB Version 5.2.1.1420 on PCWIN (C-mex files for MATLAB encounter the following problem when compiling them with WATCOM 11.0: All access-functions to files (fprintf, fscanf) cannot handle double variables, only integer and strings are read or written correctly. The file convert.c contains two functions: You may read a double-variable as a string from the file and convert it to a double (function string2double) and you may convert a double to a string (function double2string) and write it to a file (see main () in convert.c). The file conditio.dat is an example of numbers read by convert.c. The conv.exe was compiled on a Windows95-system. The files were tested for MATLAB 5.2 and WATCOM 11.0a result of " ver" is : MATLAB Version 5.2.1.1420 on PCWIN)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • bullet
    子彈 可以用C++ code做出子彈並放進射擊遊戲。(Bullets can make use C++ code and put a bullet shooter.)
    2013-12-31 03:20:27下载
    积分:1
  • mfile
    说明:  MATLAB教程(r2018a)源代码,对应书中例题,运行流畅(Matlab course (r2018a))
    2020-03-21 18:56:02下载
    积分:1
  • Matrix-Operations
    矩阵的运算,在此贡献,希望大家多多指点。(Matrix computation, in this contribution, we hope that a lot of guidance.)
    2015-03-22 13:57:54下载
    积分:1
  • ldpc_generate
    matlab源代码,可能对研究LDPC码的同仁是有很大帮助的(matlab source code, may be the study of Tongren LDPC code is of great help)
    2008-07-07 14:37:57下载
    积分:1
  • matlab-simulated-annealing
    matlab模拟退火法,包含程序和算例,基于matlab开发的(matlab simulated annealing)
    2013-08-03 16:07:49下载
    积分:1
  • JIANXIE
    C写的小程序,研究简协振动(C write small programs, research SR HS vibration)
    2005-02-28 11:42:03下载
    积分:1
  • OutputText
    OutputText.rar例子,关于txt输出,注释的特别详细(OutputText,special for txt)
    2013-12-10 10:14:33下载
    积分:1
  • de_Precoding
    mimo预编码C++代码欢迎各位参考,相互学习(mimo pre-coding C++ code to welcome you to reference, mutual learning)
    2015-01-22 19:56:52下载
    积分:1
  • mnote-carlo
    Matlab code for cell range calc using montecarlo
    2009-05-31 19:00:44下载
    积分:1
  • caculatephysics
    说明:  很好玩的,虽然简单一点,但是足可以说明混沌的出现的问题(is a lot of fun, though simple, but enough to note the emergence of a chaotic problems)
    2006-03-19 18:59:17下载
    积分:1
  • 696518资源总数
  • 104269会员总数
  • 42今日下载