(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 188
下载积分: 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 个回复

  • MK
    说明:  MK四轴飞控源代码,MK四轴飞控源代码,MK四轴飞控源代码(Flight control source code of MK quadrotor)
    2010-02-05 12:31:08下载
    积分:1
  • moxingising
    对ising模型的模拟,这是二维的情况,对于学物理的人很重要的。(Ising model for the simulation, which is two-dimensional case, for physics, it is very important.)
    2013-12-28 17:33:42下载
    积分:1
  • combine---two-binary-trees-
    This is a small program to create indexs for two binary trees and combine them to a new 003 * index tree and output the new tree,the second tree only has the left child tree then 004 * if the first tree has no left child tree,insert the second tree into the first tree as 005 * its left child and if the first tree has the left child tree,then insert the first tree 006 * into the second tree as its left child. (This is a small program to create indexs for two binary trees and combine them to a new 003* index tree and output the new tree, the second tree only has the left child tree then 004* if the first tree has no left child tree, insert the second tree into the first tree as 005* its left child and if the first tree has the left child tree, then insert the first tree 006* into the second tree as its left child.)
    2012-06-11 16:16:55下载
    积分:1
  • LFM
    线性调频信号雷达脉冲压缩仿真及程序,chirp信号的产生,压缩及效果(LFM singal simulation)
    2021-04-12 16:48:56下载
    积分:1
  • chepai
    matlab实用程序,主要针对图像处理,二值化等(matlab utilities, mainly for image processing, binarization, etc.)
    2011-04-22 14:59:03下载
    积分:1
  • IEEE-9-chaoliujisuanchengxu
    用于电力系统潮流计算的程序,IEEE9节点算例,可以改成自己想要的节点算例(Program for power flow calculation, IEEE9 node examples, you can change the node you want examples)
    2013-12-11 19:19:22下载
    积分:1
  • GuiSin
    本人精心收集的正弦内插算法,根据此算法,每个周期2.5采样点就可以重构一个正弦波形,经改造可用于VC和matlab(I carefully collected the sine interpolation algorithm, based on this algorithm, each cycle of 2.5 sampling points can reconstruct a sine wave-shaped, can be used by the transformation of VC and matlab)
    2009-10-30 09:07:30下载
    积分:1
  • Matlab-senior-notes(4)
    Matlab高级讲义-控制系统的分析方法(Matlab senior notes- control system analysis)
    2011-12-24 21:13:56下载
    积分:1
  • M200042316412a
    matlab的雷达相关程序源码,包含MTIMMTDCFAR,动目标自适应处理 可直接使用。 (Matlab radar program source code contains MTIMMTDCFAR moving target adaptive processing can be used directly.)
    2012-07-19 20:25:52下载
    积分:1
  • LDLTandCholesky
    A=(aij)20×20的LDLT分解与Cholesky分解(A = (aij) 20 × 20 in the LDLT decomposition and Cholesky decomposition)
    2010-12-04 10:53:20下载
    积分:1
  • 696516资源总数
  • 106409会员总数
  • 8今日下载