标签:www.tatmou.com, 2005: / matlabcentral / fileexchange /喂?类别% 5 b % 5 d = matlab findex % 2 MATLAB中央文件交换 程序 logo.png MATLAB中央文件交换 用户输入的代码库 2023 - 05 - 06 - t20:54:17 + 0 24 1 60 67016年 2019 - 05 - 20 - t19:35:03z 2019 - 05 - 20 - t19:35:03z C墨西哥人MATLAB版本 墨西哥人的C代码,以确定MATLAB在编译时和运行时版本

这个提交提供了以下文件协助程序员创建健壮的C / c++墨西哥人的代码可以编译和运行在多个MATLAB版本:(1)matlab_version。h预处理程序提供的代码定义了宏MATLAB_VERSION,它将包含十六进制数相当于MATLAB版本用于编译(例如,值为0 x2015b表明MATLAB版本R2015b)。它还定义了宏TARGET_API_VERSION区分R2017b和R2018a API库使用。,它包含一个原型matlab_version matlab_version中包含()函数。c文件。(2)matlab_version。matlab_version c提供了代码()函数,它返回十六进制数相当于MATLAB版本目前正在运行。(通过mexCallMATLAB回调)(3)matlab_version_test。c代码提供了一个墨西哥人matlab_version日常测试。h和matlab_version.c (4) matlab_version_test。m提供m,将自动编译matlab_version_test。c文件。To test all of this, simply type at the command line:>> matlab_version_testThere are also extensive comments at the front end of the matlab_version.h file that describe an assortment of mxArray and API changes over the years. The idea is that the macro MATLAB_VERSION can be used to determine whether various library functions or features that the programmer is depending on are actually available in the version being used for the compile. E.g., the programmer could use an #if - #else - #endif block to conditionally compile different code depending on the value of MATLAB_VERSION. And the matlab_version( ) function result can be used to determine if a MATLAB function the programmer wants to call with mexCallMATLAB is actually available in the current version of MATLAB being run.Tested under various Win32 and Win64 versions of MATLAB from R2009a - R2018a.

詹姆斯Tursa //www.tatmou.com/matlabcentral/profile/756104-james-tursa
40001年 2013 - 01 - 31 - t20:57:37z 2013 - 01 - 31 - t20:57:37z KeyInject 发送关键中风在Matlab的任何窗口

发送关键中风命名的窗口。Alt、Ctrl转变,进入选项卡都支持,允许您完全导航菜单中的其他progra金宝appmsfrom Matlab。如果你只是希望类型到另一个程序(asopposed导航菜单),看到我的其他提交“textInject”。例子:一些文本发送到记事本,用指定的文件名保存usingNotepad的菜单,然后返回Matlab焦点:keyInject (Untitled -记事本,这里是一些文本我想保存的,Untitled -记事本)keyInject (Untitled -记事本,ALT__FA, Untitled -记事本)keyInject(“另存为”,“这是我想要的文件名称。txt \ r, Matlab R2012b)金宝app支持按键:字母(a - z, 0 - 9), L Alt (“ALT__”), L Ctrl (“CTRL__”), L转变(SHIFT__)选项卡(‘\ t’),输入(‘\ r’),破折号(“-”)和时间(“。”)。Forcapital信你可以按住shift键(见下文)。按住Alt键Ctrl或Shift键:第二个下划线字符替换为一个“+”的关键,或“-”来释放它。例如选择所有文本在一个窗口andcopy到剪贴板:“CTRL_ +交流”(其次是“CTRL_——”版本)。看到截图文件交换的一个例子,如何在行动(选择文本在Matlab和复制粘贴到记事本)。添加新的键:这个必须手动完成,但是很容易如果你copythe方法我下面了。你需要一个“虚拟键代码”:http://www.kbdedit.com/manual/low_level_vk_list.htmlThe十六进制值需要被转换成小数:http://www.kbdedit.com/manual/low_level_vk_list.htmlYou不需要重新编译的墨西哥人文件添加新的键。墨西哥人文件:你必须包括源代码编译使用这个工具。键盘Windows API使用c++,所以你需要一个c++编译器(Matlab LCC编译器不会工作)。一旦你有了一个编译器,支持类型墨金宝app西哥人设置以选中它。然后把Matlab的C文件路径和类型:墨西哥人keyInject_setFocus。cc 'mex keyInject_sendKey.cc”

菲利普 //www.tatmou.com/matlabcentral/profile/1710496-phillip
65842年 2020 - 03 - 13 - t22:02:48z 2020 - 03 - 13 - t22:02:48z SHAREDCHILD创建一个共享数据的副本连续的子集 SHAREDCHILD创建一个共享数据复制现有的分段连续的变量

SHAREDCHILD创建一个共享数据复制现有的连续的子数组变量。这个墨西哥人程序创建的动机是有能力有效地创建一个引用一个小节连续的变量,而不需要创建一个深数据副本。对于非常大的变量,这可以有明显的好处,而不是创建一个深数据复制,需要在m级。EXAMPLES of using real & imag parts: >> x = reshape(1:24,2,3,4) - reshape(1:24,2,3,4)*1i % Arbitrary 3D complexx(:,:,1) = 1.0000 - 1.0000i 3.0000 - 3.0000i 5.0000 - 5.0000i 2.0000 - 2.0000i 4.0000 - 4.0000i 6.0000 - 6.0000ix(:,:,2) = 7.0000 - 7.0000i 9.0000 - 9.0000i 11.0000 -11.0000i 8.0000 - 8.0000i 10.0000 -10.0000i 12.0000 -12.0000ix(:,:,3) = 13.0000 -13.0000i 15.0000 -15.0000i 17.0000 -17.0000i 14.0000 -14.0000i 16.0000 -16.0000i 18.0000 -18.0000ix(:,:,4) = 19.0000 -19.0000i 21.0000 -21.0000i 23.0000 -23.0000i 20.0000 -20.0000i 22.0000 -22.0000i 24.0000 -24.0000i >> s = sharedchild(x,[1 2 1],[2 3 1]) % Rectangular childs = 3.0000 - 3.0000i 5.0000 - 5.0000i 4.0000 - 4.0000i 6.0000 - 6.0000i >> t = sharedchild(s,'ir') % Swapped real & imag version of st = -3.0000 + 3.0000i -5.0000 + 5.0000i -4.0000 + 4.0000i -6.0000 + 6.0000i >> c = sharedchild(x,[2 1 3],[2 2 4],'i') % Not nD rectangle, so rowc = -14 -15 -16 -17 -18 -19 -20 -21 -22 >> r = sharedchild(c,'rr').' % Real part of c used for real & imag parts of rr = -14.0000 -14.0000i -15.0000 -15.0000i -16.0000 -16.0000i -17.0000 -17.0000i -18.0000 -18.0000i -19.0000 -19.0000i -20.0000 -20.0000i -21.0000 -21.0000i -22.0000 -22.0000iFor the R2018a and later versions, note that MATLAB now uses interleaved real/imag data instead of separate real/imag data. This means you can no longer mix & match real & imag parts to create the child subarrays as shown above. What you *can* do in R2018a+ is reinterpret real variables as complex variables (with 1/2 the number of elements as the source), and you can reinterpret complex variables as real variables (with 2x the number of elements as the source). The sharedchild_test function has added tests for this functionality, as well as tests for the real2complex and complex2real mex routines (see next paragraph).Also added for the R2018a version are the standalone mex routines real2complex and complex2real. These are simple bare-bones mex routines that reinterpret real variables as complex (with first dimension halved) and complex variables as real (with first dimension doubled) respectively. They always operate on the whole variables, always return shared data copies, and do not require any persistent variables being held inside the mex routines. They can only be used with full variables (the sparse storage format is incompatible with this). They don't really provide any additional functionality that is not already present in sharedchild. Their main purpose is to provide mex programmers example code for how to do these tasks in the simplest way possible without all of the extra baggage contained in sharedchild. *** DISCLAIMER *** This mex routine uses undocumented API functions and hacks into the mxArray itself in order to create the child shared data copy. I have tried to code it in such a way that the routine will not crash MATLAB, but caveat emptor. In particular, the child variable that is returned from this mex routine is actually an invalid mxArray variable. The data pointers of the child are invalid since they point to the interior of an allocated memory block. This mex routine attempts to keep MATLAB from ever trying to free the memory behind these data pointers directly. All that being said, the rules for how MATLAB uses data pointers are not published, so I cannot guarantee that this mex routine will not crash MATLAB in some circumstances. Also, the hacks that this mex routine uses to create and manage these invalid child variables may not play nice with other mex routines using similar hacks. Updated and tested for various 32-bit and 64-bit MATLAB PCWIN versions R2009a - R2019b. Note that isempty( ) will not work in R2015b+ for emptied variables for some unknown reason (this was the primary cause of the testing failures in version 1.0). And numel( ) will crash MATLAB for emptied variables in R2015b (also for some unknown reason). It is suggested to manually clear the child subarray variables or 'UNSHARE' them rather than using the 'EMPTY' option if at all possible. If you encounter a crash, please contact the author.

詹姆斯Tursa //www.tatmou.com/matlabcentral/profile/756104-james-tursa
42212年 2013 - 06 - 13 - t18:01:23z 2013 - 06 - 13 - t18:01:23z mexPutVariableSharedDataCopy 这个C例程将共享数据的变量复制到工作区从墨西哥人例行公事

This submission is intended for C mex programmers who have a familiarity with the copy-on-write & shared data copy mechanism of MATLAB.The official mex routine mexPutVariable puts a deep data copy of a variable into a workspace directly from a mex function (without using the plhs return facility). If you are working with very large variables this deep copy can be undesirable. The enclosed function mexPutVariableSharedDataCopy acts like mexPutVariable, but it puts a shared data copy of the variable instead of a deep data copy.Enclosed is the function file itself, a header file for the function, and a test routine (with associated m-file for self-building).DISCLAIMER:This function uses unofficial techniques to hack into the mxArray variable header values directly. As such, it is not guaranteed to work on all platforms or with all MATLAB versions. It has only been tested on a few 32-bit Windows platforms.

詹姆斯Tursa //www.tatmou.com/matlabcentral/profile/756104-james-tursa
65953年 2018 - 02年- 05 - t07:05:45z 2018 - 02年- 05 - t07:05:45z MEXAsync 例子使用MATLAB墨西哥人从共享库文件调用异步函数

例子使用MATLAB调用异步函数从墨西哥人文件共享librariesSee mexasync。c源代码以获取更多信息。

米哈伊尔• //www.tatmou.com/matlabcentral/profile/2945398-mikhail
48948年 2016 - 02年- 22 - t11:20:49z 2016 - 02年- 22 - t11:20:49z VTK 6.1墨西哥人的演示及组件的完整教程安装Windows下的VTK 6.1 在windows下使用vtk 6.1通过墨西哥人与matlab, installationguide vtk 6.1

包含一个demo . cpp文件使用VTK(画一条线)和一个函数为墨西哥人文件生成并运行它,快速和肮脏的;-)我使用VTK 6.1和windows 8的64位。我有问题要找到并联系所需的vtk *。lib文件,所有文件从vtk函数链接自动/ lib。最终你必须符合vtk / lib路径的函数文件。调用函数:VTKLoadLibraries (testfile.cpp); _______I补充完整的教程中关于安装VTK 6.1在Windows 64位。它始于与CMake生成二进制文件,以生成和执行一个墨西哥人在Matlab测试文件。我希望,有人会发现它有用。我浪费了一个星期,直到一切都在我的系统工作,它很难记住我试着每一步,直到它工作。^ ^

咪咪 //www.tatmou.com/matlabcentral/profile/6027506-mimi
31257年 2012 - 11 - 13 - t15:00:03z 2012 - 11 - 13 - t15:00:03z mexme -墨西哥人写文件 写完全有效的墨西哥人. cpp文件包括mexFunction样板基于数字C / c++代码片段

mexme自动编写墨西哥人的过程文件。你给mexme C的一个片段,数值计算,以及参数的列表,它生成一个有效的墨西哥人. cpp文件。生成的代码编译Linux (gcc)和Windows (Visual Studio c++)。新的1.1版本中,它写冗长的输入和输出验证代码。这样你可以编写一个墨西哥人文件无需手动编码调用mx * API函数。它的灵感来自SciPy编织函数。例如:翻译这段(non-vectorizable)。m代码,应用递归滤波器到C:函数[y] = myrecursivefilter (x,α)y = 0(大小(x));y (1) = x(1) *α;2 = 2:长度(x) y (ii) = y (ii-1) *(1α)+ x (ii) *α;endendStep 1: myrecursivefilter写。csnip which does the same thing as the m file:y[0] = x[0]*alpha;for(mwSize i = 1; i < x_length; i++) { y[i] = x[i]*alpha + y[i-1]*(1-alpha);}Step 2: Define arguments to your function (in Matlab):inputargs = [InputNum('x'),... InputNum('alpha',true,true,'double','alpha > 0 && alpha < 1)]; %scalar %The last condition outputarg = OutputNum('y','x_length,1');Step 3: Generate a fully fledged .c file that can be compiled with mex:cfile = mexme('myrecursivefilter.csnip',inputargs,outputarg)writefile('myfilt.c',cfile);mex myfilt.cx = randn(1e6,1);y = myfilt(x,.1);plot([x,y])cfile = /*#include and #define not shown*/#include "mexmetypecheck.c"void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] ){/*Input output boilerplate*/ if(nlhs != 1 || nrhs != 2) mexErrMsgTxt("Function must be called with 2 arguments and has 1 return values"); const mxArray *x_ptr = prhs[0]; const mwSize x_m = mxGetM(x_ptr); const mwSize x_n = mxGetN(x_ptr); const mwSize x_length = x_m == 1 ? x_n : x_m; const mwSize x_numel = mxGetNumberOfElements(x_ptr); const int x_ndims = mxGetNumberOfDimensions(x_ptr); const mwSize *x_size = mxGetDimensions(x_ptr); const double *x = (double *) mxGetData(x_ptr); const mxArray *alpha_ptr = prhs[1]; if(mxGetNumberOfElements(alpha_ptr) != 1) mexErrMsgTxt("Argument alpha (#2) must be scalar"); const double alpha = (double) mxGetScalar(alpha_ptr); if(!(alpha > 0 && alpha < 1)) mexErrMsgTxt("Argument alpha (#2) did not pass test \"alpha > 0 && alpha < 1\""); mwSize y_dims[] = {x_length,1}; plhs[0] = mxCreateNumericArray(2,y_dims,mxDOUBLE_CLASS,mxREAL); mxArray **y_ptr = &plhs[0]; double *y = (double *) mxGetData(*y_ptr); /*Actual function*/#include "myfilt.csnip"}For every argument that you define, mexme generates extra "magic" variables. For example, if the variable is x, then in C:x is the datax_m is the size of the first dimensionx_n is the size of the second dimensionx_length is the length of a vectorx_numel is the number of elements in an arrayx_ndims is the numer of dimensionsx_size is equivalent to the Matlab code size(x)x_ptr is a reference to the mxArray that contains the x dataAnd if x is complex, x_r and x_i are the real and imaginary components of the data. mexme currently does not support sparse data or non-numeric types but it does support full numeric arrays of any type (int8, single, double, etc.).

帕特里克Mineault //www.tatmou.com/matlabcentral/profile/1829594-patrick-mineault
31255年 2011 - 04 - 30 - t14:56:10z 2011 - 04 - 30 - t14:56:10z 墨西哥人设置为windows x64英特尔c编译器在VS2008中12 (XE) 墨西哥人设置在VS2008中icc12链接器选项

Put this file to mexopts dir,like d:\Program Files\MATLAB\R2011a\bin\win64\mexopts\and then type >>mex -setupNow there should be a new string like [2] Intel C++ 12.0 (with Microsoft Visual C++ 2008 SP1 linker) in D:\Program Files (x86)\Intel\ComposerXE-2011\

伊戈尔 //www.tatmou.com/matlabcentral/profile/2103960-igor
71532年 2021 - 07 - 05 - t22:17:54z 2021 - 07 - 05 - t22:17:54z 简单的墨西哥人多线程w /一个持久的线程池 进一步加快你的墨西哥人文件使其更容易加入支持多线程和消除多线程开销。金宝app

我不敢相信这个结果。对于较小的问题,不能向量化,正确设置多线程在墨西哥人文件可以创建足够的开销,线程的解决方案通常是更快。使用一个线程池可以消除开销。池创建一次,然后可以在多个调用重用你的墨西哥人的功能。线程池随后关闭,从内存中清除通过键入“全部清除”或“明确的墨西哥人”命令行(或关闭MATLAB)。根据这个问题,你可能会看到一个加速的“maxNumCompThreads”,尽管这可能是不可能的。在我非常基本的测试,我看到~ 2 x加速(有四个线程)在多次迭代的小问题。为我创造了这个实际问题,我看到~ 60%加速比标准的墨西哥人多线程,拯救我总共几天仿真时间。此外,向墨西哥人添加多线程文件现在容易得多,当你只需要学习如何使用一个函数,AddThreadPoolJob。你只需要记住关闭你的墨西哥人文件SynchronizeThreads,这样你就不会得到很棒的竞态条件。看到包括madd_threadpool。madd c实例和比较。c使用正则多线程找出发生了什么。在threadpool.h还有更多的文档。 To see how single- thread vs. multi-thread vs. thread pooled vs. vectorized code compares, compile things and check out threadpool_timings.m.NOTE: properly vectorized MATLAB code will always be faster than this. Only use this stuff if you can't vectorize your code but it still lends itself to straightforward parallelization, e.g. integrating recurrence relations in multiple dimensions.

oreoman //www.tatmou.com/matlabcentral/profile/8440729-oreoman
74256年 2020 - 02年- 13 - t16:07:33z 2020 - 02年- 13 - t16:07:33z points_colinear 这段代码检查3点是否共线通过计算这些点的行列式

三个或更多的点P_1、P_2 P_3,……,据说是共线的,如果他们躺在一个单一的直线l .一行,点撒谎,尤其是如果它是相关的几何图形,如一个三角形,有时被称为一个轴。你可以检查这个链接的更多细节:http://mathworld.wolfram.com/Collinear.html

穆罕默德Abdelkader //www.tatmou.com/matlabcentral/profile/15891393-mohamed-abdelkader
30672年 2019 - 06 - 18岁t19:59:09z 2019 - 06 - 18岁t19:59:09z mxGetPropertyPtr & mxSetPropertySDC C-mex功能 快速记忆高效mxGetProperty & mxSetProperty替代API函数。

当Mathworks®引入MATLAB®版本R2008a就包含了一个叫做classdef新的面向对象的格式。这大大扩展了MATLAB®的面向对象的功能在m文件级别。还有两个新墨西哥人API函数,同时介绍:mxGetProperty mxSetProperty。不幸的是,这两个函数处理的副本而不是实际的属性。而老式的类变量可以轻松高效地访问墨西哥人API函数mxGetField, mxGetFieldByNumber, mxSetField,和mxSetFieldByNumber因为他们使用指向原来的属性,没有等价的墨西哥人API函数提供新的classdef类。墨西哥人程序员这提出了一个问题,特别是如果属性的问题很大。使用mxGetProperty将风险明显延缓常规和使用价值的堆内存。mxSetProperty也是如此。这个包中提供新的mxGetPropertyPtr C-mex函数解决了一半的问题。它返回一个指向原来的属性,而不是一个指针指向一个副本的财产。 Thus the property can be accessed efficiently inside a mex routine. The other half of the problem is solved by the new mxSetPropertySDC function, which sets a property to a shared data copy of an mxArray.These functions have been tested on various Win32 and Win64 versions of MATLAB R2009a - R2019a. For R2018a and later you are expected to use the -R2018a option when compiling your mex code with this submission.

詹姆斯Tursa //www.tatmou.com/matlabcentral/profile/756104-james-tursa
66217年 2018 - 02年- 27 - t03:42:13z 2018 - 02年- 27 - t03:42:13z c++墨西哥人开发工具 墨西哥人发展c++头文件

找到完整的描述和GitHub @上最新的文件https://github.com/hokiedsp/matlab-mexutilsThis回购包含各种c++头文件是有用的在发展中c++墨西哥人功能,也展示了如何设置CMake构建墨西哥人功能。c++头文件:*包括/ mexObjectHandler。hThis文件定义2主要模板:mexObjectHandle类和mexObjectHandler()函数。——mexObjectHandle是adoptation奥利弗·伍德福德的MATLAB类包装://www.tatmou.com/matlabcentral/fileexchange/38964The主要区别在于mexObjectHandle管理包装类的实例,而不是奥利弗的管理一个封装类对象的指针。- mexObjectHandler()是一个一体化的模板函数被称为mexFunction()来创建一个墨西哥人端来一个MATLAB类。这个函数使得开发者mexObjectHandle完全透明。有关详细信息,请参阅文档在GitHub。*包括/ mexRuntimeError。h定义一个自定义运行时错误基于std:: runtime_error包括“id”字段所以mexErrMsgIdAndTxt()可以在catch块。*包括/ mexGetString。h转换字符字符串或标量cellstr mxArray std:: string。只有单字节编码支持。金宝app*包括/ mexAllocator。h是一个定制的c++分配器,包装mxMalloc, mxRealloc, mxFree。是有用的开发Matlab-independent模板类必须动态地分配内存内部和Matlab避免memcpy()返回的数据。该分配器只能用于分配简单数据类型。这些头文件开发只在Windows (MSVC + VSCode +忍者+ CMake)。 Please let me know if there are any issues, especially on other platforms, preferably on GitHub!

Kesh Ikuma //www.tatmou.com/matlabcentral/profile/73862-kesh-ikuma
64071年 2017 - 08 - 10 - t12:58:24z 2017 - 08 - 10 - t12:58:24z rymut / matlab-mex-intel18 XML配置文件来编译MATLAB mex files使用英特尔平行Studio XE 2018(β)。

Matlab XML配置英特尔并行工作室2018 XE compilerXML配置文件来编译Matlab mex files使用英特尔平行Studio XE 2018(β)。测试在Windows 64位与MATLAB R2017与英特尔和微软Visual Studio 2017专业平行Studio XE 2018(β)。配置也应该适用于英特尔最终版本平行Studio XE 2018。(intel_c_18_vs2017 InstallFirst复制文件。xml, intel_cpp_18_vs2017。xml, intel_fortran_18_vs2017.xml) MATLABROOT \ bin \ win64 \ mexopts(操作可能需要管理员权限)。ConfigureNext运行墨西哥人设置C,墨西哥人设置c++,和墨西哥人设置在MATLAB FORTRAN。选择“英特尔平行Studio XE 2017与微软Visual Studio 2017 (C)的C编译器,”英特尔平行工作室2018 XE c++与微软Visual Studio 2017的c++编译器,和“英特尔平行工作室2018 XE Fortran与微软Visual Studio 2017的Fortran编译器。eval(['墨西哥人设置:“…matlabroot ' \ bin \ win64 \ mexopts \ intel_c_18_vs2017。xml“C ']) eval(['墨西哥人设置:“……matlabroot ' \ bin \ win64 \ mexopts \ intel_cpp_18_vs2017。xml”c++ ']) eval(['墨西哥人设置:“……matlabroot ' \ bin \ win64 \ mexopts \ intel_fortran_18_vs2017。xml“FORTRAN)检查一切是否附带workingTest新设置的示例MEX-file MATLAB: %复制示例文件yprime.ccopyfile (fullfile (matlabroot、“外来的”、“例子”,“墨西哥人”,“yprime.c”),“。”,“f”)复制文件(fullfile (matlabroot、“外来的”、“例子”,“墨西哥人”,“yprimef.f”),“。”,“f”)复制文件(fullfile (matlabroot、“外来的”、“例子”,“墨西哥人”,“yprimefg.f”),“。”,“f”) % yprime制作副本。cpp yprime。c filecopyfile (yprime。c”、“yprimecpp.cpp”)使用英特尔c % c编译命令文件Compilermex - n -largeArrayDims yprime。c %编译filemex - v -largeArrayDims yprime。c %测试函数正确答是(2.0000,8.9685,4.0000,-1.0947)T = 1; Y=1:4; ansc = yprime(T,Y)% clear mexclear mex;% compile command for CPP file using Intel C++ Compilermex -n -largeArrayDims yprimecpp.cpp% compile filemex -v -largeArrayDims yprimecpp.cpp% test function correct ans is [2.0000, 8.9685, 4.0000, -1.0947]T=1; Y=1:4; anscpp = yprimecpp(T,Y)% compile command for CPP file using Intel FORTRAN Compilermex -n -largeArrayDims yprimef.f yprimefg.F% compile filemex -v -largeArrayDims yprimef.f yprimefg.F% test function correct ans is [2.0000, 8.9685, 4.0000, -1.0947]T=1; Y=1:4; ansfortran = yprimef(T,Y)

Boguslaw Rymut //www.tatmou.com/matlabcentral/profile/3763251-boguslaw-rymut
46427年 2014 - 05 - 01 - t21:14:45z 2014 - 05 - 01 - t21:14:45z MxArrayDefinition 创建一个C风格的定义mxArray(墨西哥人使用应用程序)

这个函数尝试以编程方式确定一个合适的mxArray结构的定义。这是为了允许用户探索MATLAB的mxArray的运作,促进使用无证方法在墨西哥人的功能。这个函数分析了mxArray首先发现其大小,然后检查修改后的字节的mxArray mxArray MATLAB中被修改。在某些情况下,从两个mxArrays字节模式进行比较,以确定哪些mxArray属性是由哪些字节。动机的方法描述的方法:http://undocumentedmatlab.com/blog/matlabs-internal-memory-representationDue可能它的工作原理,它可能无法找到mxArray偶尔的成员。如果错过了一些东西,再试一次xD。输出应该是什么样的例子包括:mxInternals_R2010A。h和mxInternals_R2013B。hWARNING:这个函数试图读取数据从内存指针可能没有有效的——这可能会崩溃MATLAB,所以保存所有工作之前运行。如果出现这种情况——不要恐慌,就重启Matlab和再试一次。它一直在测试:R2013B R2012B R2010A(一些windows、unix)。免责声明,这个函数没有BIG endian机器上进行测试。当我试图使程序兼容big endian机器,我不能测试它。如果你有一个,我想知道它的工作原理!ACKNOWLEDGEMENTSThe早期mxArray调查完成byPeter Boetcher,詹姆斯•Tursa Bruno陈德良约书亚狄龙和所有其他参与。彼得•李Yair奥特曼和“马丁”:http://undocumentedmatlab.com/blog/matlabs-internal-memory-representation

安德鲁 //www.tatmou.com/matlabcentral/profile/1060431-andrew
41041年 2013 - 04 - 03 - t19:30:54z 2013 - 04 - 03 - t19:30:54z 操纵杆墨西哥人文件 便携式操纵杆墨西哥人使用SDL文件

一个墨西哥人函数,它返回操纵杆轴和按钮。应该合理的便携式因为它是基于SDL运行在Mac上,Linux,赢了。>> [j,b] = joystickj = 0 0 -0.0039 0.0039b = 0 0 0 0 0 0 0 0 0 0 0 0 Could be wrapped into an S-function.Simulink comes with similar functionality if you have the 3D Animation Toolbox.Tested on R2012b MacOS 10.8.2 (ML) with SDL 1.2.15.

彼得·柯克 //www.tatmou.com/matlabcentral/profile/44145-peter-corke
38720年 2012 - 10 - 24 - t20:14:51z 2012 - 10 - 24 - t20:14:51z MS Visual Studio构建墨西哥人的属性表的功能 利用属性表和项目配置简单

注意:这个解决方案致力于发展与Visual Studio 2012墨西哥人功能(这是不支持的“墨西哥人”2013年之前发布)Mathworks(概述金宝app//www.tatmou.com/help/matlab/matlab_external/custom-building-mex-files.html f24571)墨西哥人功能可以在Visual Studio开发(或Visual c++)。建立一个与项目每一个墨西哥人函数(和维护项目的完整性在每年两次的MATLAB更新)很快就会变得麻烦。Visual Studio的属性表功能为我们提供了一个简单的方法来保持所有墨西哥人在一个place.Matlab_Mex_Build项目设置。道具包含所有必要的配置来做一个DLL项目到墨西哥人的项目。遵循“如何创建一个墨西哥人项目在VS”下面的用法,和阅读“如何改变MATLAB路径”下面设置新创建的宏“MatlabExternDir”。如何创建一个新的墨西哥人在VS项目:1。创建一个空c++ Win32 DLL project.2。去物业经理(可以从视图菜单或在解决方案资源管理器选项卡)3。右键单击创建的项目的名称,点击“添加现有的属性表…”。在对话框窗口中,选择下载并解压“Matlab_Mex_Build.props”4。将源代码文件添加到项目,并开始编程!如何改变MATLAB道路:1。“Matlab_Mex_Build开放。props" in a text editor (recommend VS as it gives you XML color coding)2. Look for . There are 2 in the file: one for Win32 and another for x64. Modify the applicable MatlabExternDir according to the installed Matlab version (or both if you have both 32- and 64-bit versions of MATLAB installed)

Kesh Ikuma //www.tatmou.com/matlabcentral/profile/73862-kesh-ikuma
31256年 2011 - 04 - 30 - t15:17:47z 2011 - 04 - 30 - t15:17:47z 墨西哥人设置为windows x64英特尔c编译器与VS2010 12 (XE) 墨西哥人设置icc12 VS2010链接器选项

Put this file to mexopts dir,like d:\Program Files\MATLAB\R2011a\bin\win64\mexopts\and then type >>mex -setupNow there should be a new string like [3] Intel C++ 12.0 (with Microsoft Visual C++ 2010 linker) in D:\Program Files (x86)\Intel\ComposerXE-2011\

伊戈尔 //www.tatmou.com/matlabcentral/profile/2103960-igor
30120年 2011 - 01 - 24 t12:31:39z 2011 - 01 - 24 t12:31:39z Matlab守护进程 Bash脚本和墨西哥人项目允许# !Matlab会话风格的脚本的背景。

不幸的是Mathworks没有设计的Matlab像典型的Unix翻译,即。,没有# !(“住所”)支持类似于B金宝appash, Perl或Python。这个提交展示了如何设置这只使用约20行bash(和一个小墨西哥人程序用C语言编写),减少执行时间的# !脚本,所提供的Bash脚本建立背景会议Matlab和再利用这个会话。请参阅“readme。html”安装和评论。

约书亚·狄龙 //www.tatmou.com/matlabcentral/profile/2002642-joshua-dillon
26825年 2010 - 03 - 03 - t18:30:54z 2010 - 03 - 03 - t18:30:54z 墨西哥人文件的工具 C效用函数简化编写墨西哥人源文件和一个使用命令来创建它们。

包包含一组C函数和预处理器宏来简化编写源文件墨西哥人。例程帮助检查输入和输出参数计算,参数类型、尺寸和结构在一个墨西哥人文件中。见“常见。c”的子文件夹“包括”的细节。示例代码包含在子文件夹“例子”来演示使用。例子包括平方欧氏距离两个向量,一个向量和一组向量,向量的和两个配对集;克罗内克张量积;汉克尔和托普利兹矩阵结构;耦合单元阵列的稀疏矩阵到一个稀疏矩阵。这个包还有一个实用程序,重新编译所有C (C)和c++源文件(. cpp)墨西哥人在使用常见的目录层次结构包括目录,检查修改日期,以避免不必要的重新编译。

Levente Hunyadi //www.tatmou.com/matlabcentral/profile/1879353-levente-hunyadi
17661年 2009 - 08 - 05 - t04:31:50z 2009 - 08 - 05 - t04:31:50z swapbytes C-mex函数 swapbytes (X1, X2,…)逆转字节次序的每一个元素,从高位优先/低位优先值

swapbytes是自身建设C-mex函数模拟的MATLAB内在功能相同的名称,扭转的字节数组中每个元素的顺序X1, X2,…,将低位优先值转换为大端法(反之亦然)。主要用于用户与旧版本没有这种内在的MATLAB函数可用,但也有扩展其他用户可能感兴趣的:1)结构和细胞阵列,每个组件或细胞单独转换。其他类(例如,vpa函数处理,等等)不转换;返回一个深拷贝instead.2) swapbytes任意数量的输入参数;必须有相同数量的匹配输出参数(除了特殊情况的一个输入参数和输出参数,在这种情况下,答案是返回ans)。3) swapbytes将转换的复杂部分变量以及真正的portion.4) swapbytes处理稀疏矩阵。为用户后续版本的MATLAB,墨西哥人文件将具有相同名称的实际内在冲突。如果你想使用这个墨西哥人文件还使用MATLAB内在,简单地重命名这个文件和帮助文件一些独特的东西,像swapbytesx。c和swapbytesx。mswapbytes运行多达3倍的速度比MATLAB内在swapbytes MATLAB的一些版本。注意,swapbytes是一个自身建设C-mex函数…你不需要知道任何关于C构建或使用它。

詹姆斯Tursa //www.tatmou.com/matlabcentral/profile/756104-james-tursa
21825年 2008 - 10 - 21 - t13:15:09z 2008 - 10 - 21 - t13:15:09z 简单的Haskell MEX-file 陈写8位/ RGB TIFF图像unassocα和XPOSITION YPOSITION标签

TIFF文件的简单替换IMWRITE alpha通道和XPOSITION YPOSITION tagsDemonstrates Haskell编程中如何编写mex files languageDemonstrates如何向第三方接口Haskell MEX-file国外图书馆

雅科夫 //www.tatmou.com/matlabcentral/profile/1127597-yakov
7717年 2005 - 05 - 26 - t09:59:12z 2005 - 05 - 26 - t09:59:12z MEX-Builder和文件版本控制 自动文件版本和版权信息包含在MEX-libraries Microsoft Windows。

MATLAB编译器工具箱构建本地库(MEX-functions)和可执行文件(应用程序)为不同的平台。编译器脚本“墨西哥人”和“世纪挑战集团”提供了一个用户友好的界面来编译和链接M, C, c++, Fortran和汇编文件。这个包添加了自动文件版本和版权信息包含在MEX-libraries Microsoft Windows。完整的信息,请参阅“Readme。txt”包含在这个包中。

马塞尔Leutenegger //www.tatmou.com/matlabcentral/profile/869720-marcel-leutenegger
1136年 2004 - 06 - 07 - t12:17:29z 2004 - 06 - 07 - t12:17:29z 博士联系 霍尼韦尔博士数据库获得数据。

一组m -和mex files霍尼韦尔博士从数据库获取数据(用于化工厂)。没有限制的数据量。用于原始数据、快照和平均水平。

汉斯Vereecken //www.tatmou.com/matlabcentral/profile/869156-hans-vereecken
3309年 2003 - 04 - 28 - t09:55:23z 2003 - 04 - 28 - t09:55:23z MEX-file项目建设者的模板 轻松地创建和调试项目建设者mex files。

这MacOS X项目建设者模板可以用来轻松创建一个MATLAB MEX-file项目。mex files的源代码级调试的主要好处是使用这个模板。

汤姆•戴维斯 //www.tatmou.com/matlabcentral/profile/140196-tom-davis