رفتن به مطلب

ارسال های توصیه شده

gij4x8av40pnjw4imsyh.png

 

متلب با استفاده از فایل های MEX می تونه برنامه های نوشته شده به زبان های ++C/C و Fortran رو اجرا کنه، MEX از MATLAB Executable گرفته شده، شامل کدها و توابع کامپایل شده ی ++C/C و Fortran هستن که همانند M-fileها و فانکشن های Build-in متلب از داخل Command Window قابل اجرا هستن.

استفاده از MEX فایل ها دو مزیت می تونه داشته باشه:

 

 

  1. استفاده از کد های ++C/C و Fortran موجود، بدون نیاز به نوشتن دوبارشون داخل متلب و تبدیلشون به M-file (البته برای تبدیل به MEX هم باید یه تغییراتی توی کدنویسی فایل ها انجام بشه)
  2. حل مشکل سرعت در عملیات های تکراری (مثل حلقه های for)، کاهش زمان اجرای محاسبات کند با استفاده از نوشتن برنامه به زبان های ++C/C و Fortran و تبدیلشون به MEX. حتی خود شرکت Mathworks هم یکی از کارهایی که برای افزایش سرعت اجرای بعضی از فانکشن های Build-in متلب استفاده کرده، همین هست.

برای تبدیل کدهای ++C/C و Fortran به MEX نیاز به کامپیایلر همین زبان ها داریم، حتی در ورژن های جدید متلب بعضی از بلوک های سیمولینک مثل Matlab Function بدون کامپالر قابل استفاده نیستن، برای معرفی یه کامپایلر به متلب می تونیم از دستور MEX استفاده کنیم، داخل Command Window می نویسیم:

 

:100: البته این صحبت ها بیشتر در مورد متلب 64 بیتی هستش، توی ورژن های 32 بیتی همزمان با نصب متلب یه کامپایلر هم نصب میشه، که متلب برای بیشتر کارها می تونه ازش استفاده کنه.

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

بعد از اینکه این دستور رو اجرا می کنیم، متلب کامپایلر هایی که روی سیستم نصب هست رو لیست می کنه. مثلا اگه از ++Visual Studio C استفاده می کنین، توی این لیست نشون داده میشه. با وارد کردن عدد کنار هر کدوم از این کامپایلرهای لیست شده، می تونیم اون رو به عنوان کامپایلری که متلب ازش استفاده کنه انتخاب کنیم. در ادامه هم از ما برای تایید این کامپالر سوال می کنه، که باید تایید کنیم. در آخر هم یه چنین عبارتی رو بهمون نشون میده:

 

 

MEX configured to use 'Microsoft Windows SDK 7.1 ©' for C language compilation.

Warning: The MATLAB C and Fortran API has changed to support MATLAB variables with more than 2^32-1 elements. In the near future

 

you will be required to update your code to utilize the

new API. You can find more information about this at:

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.
.

 

 

اینجا کامپایلر مورد استفاده متلب Microsoft Windows SDK 7.1 مشخص شده.

اما در صورتی که کامپایلری روی سیستم نصب نباشه چیکار کنیم، این رو توی پست بعد توضیح میدم.

لینک به دیدگاه

اول ببینیم خود متلب چه کامپالرهایی رو معرفی کرده، برای آخرین ورژن فعلی متلب (R2014a) به این لینک مراجعه می کنیم:

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

eov81v5awmybpoiexjy3.png

 

چون دسترسی به این سایت با IP ایران ممکن نیست، باید از ف ی ل ت ر شکن استفاده بشه، مطالبی که اونجا قرار داره رو میارم:

 

MATLAB Product Family – Release 2014a

[TABLE=class: grid, width: 700, align: left]

[TR]

[TD=align: center]

[/TD]

[TD=align: center]MATLAB[/TD]

[TD=align: center]MATLAB Compiler[/TD]

[TD=align: center]MATLAB Builder EX[/TD]

[TD=align: center]MATLAB Builder NE[/TD]

[TD=align: center]MATLAB Builder JA[/TD]

[TD=align: center]MATLAB Coder[/TD]

[TD=align: center]SimBiology[/TD]

[TD=align: center]Fixed-Point Designer[/TD]

[/TR]

[TR]

[TD=align: center]Compiler[/TD]

[TD=align: center]For MEX-file compilation, loadlibrary, and external usage of MATLAB Engine and MAT-file APIs[/TD]

[TD=align: center]For C and C++ shared libraries[/TD]

[TD=align: center]For all features[/TD]

[TD=align: center]For all features[/TD]

[TD=align: center]For all features[/TD]

[TD=align: center]For all features[/TD]

[TD=align: center]For accelerated computation[/TD]

[TD=align: center]For accelerated computation[/TD]

[/TR]

[TR]

[TD=align: center]

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

Available at no charge; requires

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.
[/TD]

[TD=align: center]

 

:100:[/TD]

[TD=align: center]

 

:100:[/TD]

[TD=align: center]

 

:100:[/TD]

[TD=align: center]

 

:100: 4[/TD]

[TD=align: center][/TD]

[TD=align: center]

 

:100: 6[/TD]

[TD=align: center]

 

:100:[/TD]

[TD=align: center]

 

:100:[/TD]

[/TR]

[TR]

[TD=align: center]

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.
[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100: 4[/TD]

[TD=align: center][/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[/TR]

[TR]

[TD=align: center]Microsoft Visual C++ 2012 Professional[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100: 4[/TD]

[TD=align: center][/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[/TR]

[TR]

[TD=align: center]Microsoft Visual C++ 2010 Professional SP1[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100: 4[/TD]

[TD=align: center][/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[/TR]

[TR]

[TD=align: center]Microsoft Visual C++ 2008 Professional SP1 and

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.
1 2[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100: 4[/TD]

[TD=align: center][/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[/TR]

[TR]

[TD=align: center]Intel C++ Composer XE 2013 3[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[/TR]

[TR]

[TD=align: center]Intel C++ Composer XE 2011 1 3[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[/TR]

[TR]

[TD=align: center]Intel Visual Fortran Composer XE 2013 3[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[/TR]

[TR]

[TD=align: center]Intel Visual Fortran Composer XE 2011 1 3[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[/TR]

[TR]

[TD=align: center]

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.
2.0, 3.0, 3.5, 4.0

Available at no charge[/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center]:100: 4 5[/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[/TR]

[TR]

[TD=align: center]

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.
1.7

Available at no charge[/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center]:100:[/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[/TR]

[TR]

[TD=align: center]lcc-win64

Included with products that support it[/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center]:100: 6[/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[/TR]

[/TABLE]

 

 

 

Simulink Product Family – Release 2014a

[TABLE=class: grid, width: 700, align: left]

[TR]

[TD=align: center]

[/TD]

[TD=align: center]Simulink

[/TD]

[TD=align: center]Simulink

[/TD]

[TD=align: center]Stateflow

[/TD]

[TD=align: center]Simulink Coder

[/TD]

[TD=align: center]Embedded Coder

[/TD]

[TD=align: center]Simulink Real-Time[/TD]

[/TR]

[TR]

[TD=align: center]Compiler[/TD]

[TD=align: center]For S-Function compilation[/TD]

[TD=align: center]For Model Referencing, Accelerator mode, Rapid Accelerator mode, and MATLAB Function blocks[/TD]

[TD=align: center]For all features[/TD]

[TD=align: center]For all features[/TD]

[TD=align: center]When targeting the host OS[/TD]

[TD=align: center]For all features[/TD]

[/TR]

[TR]

[TD=align: center]

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.
Available at no charge; requires
برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100: 7

[/TD]

[TD=align: center]:100: 7

[/TD]

[TD=align: center]:100:[/TD]

[/TR]

[TR]

[TD=align: center]

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center][/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center][/TD]

[/TR]

[TR]

[TD=align: center]Microsoft Visual C++ 2012 Professional

[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[/TR]

[TR]

[TD=align: center]Microsoft Visual C++ 2010 Professional SP1

[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[/TR]

[TR]

[TD=align: center]Microsoft Visual C++ 2008 Professional SP1 and

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.
1 2

[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[/TR]

[TR]

[TD=align: center]Intel C++ Composer XE 20133

[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[/TR]

[TR]

[TD=align: center]Intel C++ Composer XE 2011 1 3

[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[/TR]

[TR]

[TD=align: center]Intel Visual Fortran Composer XE 2013 3

[/TD]

[TD=align: center]:100: 8

[/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center]:100: 9

[/TD]

[/TR]

[TR]

[TD=align: center]Intel Visual Fortran Composer XE 2011 1 3

[/TD]

[TD=align: center]:100: 8

[/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center]:100: 9

[/TD]

[/TR]

[TR]

[TD=align: center]lcc-win64

Included with products that support it

[/TD]

[TD=align: center][/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center]:100:[/TD]

[TD=align: center][/TD]

[/TR]

[/TABLE]

 

 

Notes for the Windows (64-bit) Platform

 


    [*=left]Support for this version of this compiler will be discontinued in a future release, at which time a new version will be supported. Consult the
    برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.
    for more information.
    [*=left] Both Microsoft Visual Studio 2008 and Windows Software Development Kit (SDK) 6.1 must be installed. When installing Microsoft Visual Studio, you must choose "X64 Compilers and Tools" when installing Microsoft Visual Studio; this is not selected by default.
    [*=left]Intel compilers depend on tools provided by Microsoft. The following combinations are supported:
     
    [TABLE=class: grid, align: left]
    [TR]
    [TH=class: cell_30, align: center][/TH]
    [TH=class: txt_center, align: center]Microsoft Windows SDK 7.1[/TH]
    [TH=class: txt_center, align: center]Microsoft Visual Studio 2012 Professional (64-bit)[/TH]
    [TH=class: txt_center, align: center]Microsoft Visual Studio 2010 Professional SP1 (64-bit)[/TH]
    [TH=class: txt_center, align: center]Microsoft Visual Studio 2008 SP1 Professional Edition (64-bit)[/TH]
    [/TR]
    [TR]
    [TD=align: center]Intel C++ Composer XE 2013[/TD]
    [TD=align: center]:100:[/TD]
    [TD=align: center]:100:[/TD]
    [TD=align: center]:100:[/TD]
    [TD=align: center][/TD]
    [/TR]
    [TR]
    [TD=align: center]Intel C++ Composer XE 2011[/TD]
    [TD=align: center]:100:[/TD]
    [TD=align: center][/TD]
    [TD=align: center]:100:[/TD]
    [TD=align: center]:100:[/TD]
    [/TR]
    [TR]
    [TD=align: center]Intel Visual Fortran Composer XE 2013[/TD]
    [TD=align: center]:100:[/TD]
    [TD=align: center]:100:[/TD]
    [TD=align: center]:100:[/TD]
    [TD=align: center][/TD]
    [/TR]
    [TR]
    [TD=align: center]Intel Visual Fortran Composer XE 2011[/TD]
    [TD=align: center]:100:[/TD]
    [TD=align: center][/TD]
    [TD=align: center]:100:[/TD]
    [TD=align: center]:100:[/TD]
    [/TR]
    [/TABLE]
    [*=left]To build .NET components, a Microsoft .NET Framework must be installed. The .NET Framework v3.0 does not contain a framework-specific compiler; compatible components can be built using the v2.0 compiler. The .NET Framework is automatically installed by Visual Studio. It can also be downloaded from the Microsoft Web site. To execute applications that use the resulting .NET components, the target machine must have the matching .NET Framework installed.
    [*=left]MATLAB Builder NE supports building .NET assemblies but not COM objects when using the Microsoft .NET Framework SDK without Microsoft Visual Studio.
    [*=left]This compiler does not support OpenMP. Code generation will treat parfor-loops as for-loops.
    [*=left].sln project generation is not supported when using the Microsoft Windows SDK.
    [*=left]Fortran compilers are supported with Simulink only for creating Simulink S-Functions using the MATLAB MEX command. The S-Functions can be used with normal and accelerated simulations.
    [*=left]Simulink Real-Time supports Fortran code in Simulink models using C-MEX wrapper S-Functions.

برای ورژن های قدیمی تر از لینک زیر می تونیم کامپایلرهایی که معرفی شده رو مشاهده کنیم:

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

به همین صورت که توی شکل نشون داه شده، از ستون اول ورژن متلب مورد نظر رو پیدا می کنیم، در مقابلش توی ستون آخر لینک کامپایلرهایی که توسط اون ورژن از متلب ساپورت میشن رو انتخاب می کنیم:

 

9fi3u5vou2knbc4wsqw4.png

لینک به دیدگاه
  • 3 هفته بعد...

همینطور که توی عکس اول پست قبل هم مشخصه متلب Microsoft SDK 7.1 رو پیشنهاد می کنه. که برای ورژن های جدید متلب می تونه استفاده بشه، نیاز به کرک یا سریال هم نداره، چون یه ابزار رایگان هست. البته همونطور که توی پست اول هم گفتم از ویژال استدیو استفاده می کنین، نیاز به نرم افزار دیگه ای ندارین، از همون می تونین استفاده کنین. برای دانلود SDK به خود سایت ماکروسافت مراجعه می کنیم:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

البته این لینک دانلود و نصب آنلاینش هست، برای دانلود فایل ایمیج می تونیم به لینک زیر مراجعه کنیم، بعد از دانلود داخل درایو مجازی Mount کنیم و نصب کنیم. برای دفعه های بعدی هم می تونیم از همین فایل استفاده کنیم:

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

 

وقتی گزینه ی دانلود رو انتخاب کنیم، با سه تا فایل روبرو میشیم، خب معمولا برای ویندوز های 64 بیتی نیاز داریم این فایل رو نصب کنیم، پس فایل GRMSDKX_EN_DVD.iso رو دانلود می کنیم:

 

jlvhv7d0racb1myrv2j.png

 

دو فایل دیگه هم به ترتیب برای ویندوز های 32 بیتی و فایل دوم هم برای ویندوز Itanium هست. توی پست بعد آموزش تصویری نصب SDK و همراه با مشکلاتی ممکنه هنگاه نصب باهاش مواجه بشیم، که برای خود سایت Mathworks.com هست، رو قرار میدم.

 

برای نصب با فایل iso از مرحله سوم پست زیر شروع کنین.

 

توی TROUBLESHOOTING خطاهایی که موقع نصب ممکنه اتفاق بیفته رو توضیح داده، اما برای نصب روی ویندوز سون معمولا حالت دوم یعنیMicrosoft Visual Studio C++ 2010 نصب باشه پیش میاد، که توی خطایی که میده هم همچین چیزی رو مشخص نمی کنه، برای حل این مشکل می تونیم، نسخه های 32 و 64 بیتی اون رو از داخل کنترل پنل uninstall کنیم.

 

Microsoft Visual C++ 2010 x86 Redistributable

Microsoft Visual C++ 2010 x64 Redistributable

اگه بعد نصب کامل هم بازم با دستور mex نتونستین، این کامپالر رو به متلب معرفی کنین، از فایل patchی که توی پست زیر قرار گرفته استفاده کنین.

لینک به دیدگاه

PREREQUISITE INFORMATION

If you have any of the following cases true, see the troubleshooting section at the bottom before proceeding with the SDK 7.1 installation.

 


    [*=left]Microsoft Visual Studio C++ 2010 SP1 installed
    [*=left].NET Framework 4.5 installed
    [*=left]Using Windows 8

INSTALLING THE WINDOWS SDK 7.1

1. Download Windows SDK for Windows 7 and .NET Framework 4 from Microsoft at:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

2. When the download is complete, choose to run winsdk_web.exe. Depending on your security settings, you may be prompted by User Account Control (UAC) to confirm “making changes to this computer”.

 

7j90yzeedvwuxyey0lxx.png

 

3. After several seconds, the Setup Wizard will appear.

p78q2luidjmm1x5u7q1.png

 

4. Click through the wizard, accepting the license agreement and not changing any of the installation folders.

5u8cqwlhokcxfbtpkr73.png

 

5. Continue through the wizard to download and install the SDK. Depending on the speed of your Internet connection, this step will take several minutes to an hour or more.

 

8w10qoirz5a3fened8jz.png

6. The setup wizard finishes.

 

bgctsf5jlbpx8pogpk62.png

 

TROUBLESHOOTING

.NET Framework 4.5 already installed or using Windows 8

If you have .NET Framework 4.5 installed, or are using Windows 8, SDK 7.1 may fail to install. In this case:

 


    [*=left]Uninstall .NET Framework 4.5.
    [*=left]Install the SDK 7.1 using the instructions above.
    [*=left]Reinstall .NET Framework 4.5 if needed.

If SDK 7.1 is installed successfully, but with a message saying .NET 4 could not be installed due to the presence of .NET 4.5, you may need to uninstall .NET 4.5 first as well and retry.

 

Microsoft Visual Studio C++ 2010 SP1 already installed

If Microsoft Visual Studio C++ 2010 SP1 is already installed, SDK 7.1 may fail to install. In this case:

 


    [*=left]Remove the 2010 Redistributable packages (both x86 and x64).
    [*=left]Install SDK 7.1 using the instructions above.
    [*=left]Apply the SDK 7.1 patch.
    [*=left]Reinstall 2010 Redistributable packages if needed.

If you have both Microsoft Visual Studio C++ 2010 SP1 and SDK 7.1 installed, but running into various errors during compilation, apply the SDK 7.1 patch to fix the issue.

 

"ammintrin.h missing" error

This occurs if only SDK 7.1 was installed (without Microsoft Visual Studio C++ 2010 SP1 present on the machine), and then the SDK 7.1 patch is applied. In this case:

 


    [*=left]Install Visual Studio C++ 2010 (if not already installed). Either Professional or the free Express version works.
    [*=left]Upgrade Visual Studio C++ 2010 to SP1.

 

SUPPORTING LINKS AND INSTRUCTIONS

Installing the SDK 7.1 patch

The SDK 7.1 patch can be download and installed from:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

Installing Microsoft Visual Studio C++ 2010 Express (free)

Visual Studio C++ 2010 Express is offered free from Microsoft and can be downloaded and installed from:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

More details on the installation process can be found at:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

Upgrading Microsoft Visual Studio C++ 2010 to SP1

Microsoft Visual Studio C++ 2010 SP1 upgrade can be obtained from:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

منبع:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

لینک به دیدگاه

با سلام

 

من Microsoft SDK 7.1 رو نصب کردم و طبق فرمایشتون با اجرا نشدا mex اقدام به نصب SDK 7.1 patch کردن ولی بازم مشکل رفع نشده و خطار زیر رو میده.

متلب من 2013a هستش و Windows 8

Please verify your choices:

 

Compiler: Microsoft Software Development Kit (SDK) 7.1

Location: C:\Program Files (x86)\Microsoft Visual Studio 10.0

 

Are these correct [y]/n? y

 

***************************************************************************

Warning: MEX-files generated using Microsoft Windows Software Development

Kit (SDK) require that Microsoft Visual Studio 2010 run-time

libraries be available on the computer they are run on.

If you plan to redistribute your MEX-files to other MATLAB

users, be sure that they have the run-time libraries.

***************************************************************************

 

 

Trying to update options file: C:\Users\soheil-vaio\AppData\Roaming\MathWorks\MATLAB\R2013a\mexopts.bat

From template: C:\PROGRA~1\MATLAB\R2013a\bin\win64\mexopts\mssdk71opts.bat

 

Done . . .

 

**************************************************************************

Warning: The MATLAB C and Fortran API has changed to support MATLAB

variables with more than 2^32-1 elements. In the near future

you will be required to update your code to utilize the new

API. You can find more information about this at:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

Building with the -largeArrayDims option enables the new API.

**************************************************************************

لینک به دیدگاه
با سلام

 

من Microsoft SDK 7.1 رو نصب کردم و طبق فرمایشتون با اجرا نشدا mex اقدام به نصب SDK 7.1 patch کردن ولی بازم مشکل رفع نشده و خطار زیر رو میده.

متلب من 2013a هستش و Windows 8

Please verify your choices:

 

Compiler: Microsoft Software Development Kit (SDK) 7.1

Location: C:\Program Files (x86)\Microsoft Visual Studio 10.0

 

Are these correct [y]/n? y

 

***************************************************************************

Warning: MEX-files generated using Microsoft Windows Software Development

Kit (SDK) require that Microsoft Visual Studio 2010 run-time

libraries be available on the computer they are run on.

If you plan to redistribute your MEX-files to other MATLAB

users, be sure that they have the run-time libraries.

***************************************************************************

 

 

Trying to update options file: C:\Users\soheil-vaio\AppData\Roaming\MathWorks\MATLAB\R2013a\mexopts.bat

From template: C:\PROGRA~1\MATLAB\R2013a\bin\win64\mexopts\mssdk71opts.bat

 

Done . . .

 

**************************************************************************

Warning: The MATLAB C and Fortran API has changed to support MATLAB

variables with more than 2^32-1 elements. In the near future

you will be required to update your code to utilize the new

API. You can find more information about this at:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

Building with the -largeArrayDims option enables the new API.

**************************************************************************

 

سلام دوست عزیز

 

من متوجه ارور نمی شم، نصب شده که، پیغام آخرش هم به نظر نشون داده که، البته من آخرین بار 5 - 6 ماه بود نصب کردم. کدوم ارور منظورتون هست؟البته بالا هم گفته برای نصب روی ویندوز 8 اول NET Framework 4.5. رو uninstall کنین، بعد نصب کنین:

.NET Framework 4.5 already installed or using Windows 8

If you have .NET Framework 4.5 installed, or are using Windows 8, SDK 7.1 may fail to install. In this case:


    [*=left]Uninstall .NET Framework 4.5.
    [*=left]Install the SDK 7.1 using the instructions above.
    [*=left]Reinstall .NET Framework 4.5 if needed.

If SDK 7.1 is installed successfully, but with a message saying .NET 4 could not be installed due to the presence of .NET 4.5, you may need to uninstall .NET 4.5 first as well and retry.

لینک به دیدگاه
دقیقا همین کارو کردم (حذف

net framework 4.5.

) چون اگر انجام نمی دادم microsoft sdk 7.1 نصب نمیشد

والا خودمم سر در نمیارم چرا اینقد ناز داره!!!!:w000:

 

این واسه خود ماکروسافت هست دیگه، مشکلات نصب هم از خود sdk هست.

نگفتی منظورت چه اروریه؟

لینک به دیدگاه
ارور خاصی نداره همون هشدارایی که بالا آوردمو تو متلب مینویسه...

 

آهان اون وارنینگ رو میگی، نه مشکلی نداره، توی پست اول پیغامی که گذاشتم هم وارنینگ داره دیگه.

به نظر که درست نصب شده، می تونی با مثال خود متلب هم امتحانش کنی.:a030:

لینک به دیدگاه

سلام. من رو سیستمم visual studio.net 2012 دارم همین طور codevision و code block

اما وقتی تو متلب mex -setup رو میزنم این خطا رو میده:

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

لطفا راهنمایی کنید

لینک به دیدگاه
سلام. من رو سیستمم visual studio.net 2012 دارم همین طور codevision و code block

اما وقتی تو متلب mex -setup رو میزنم این خطا رو میده:

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

لطفا راهنمایی کنید

 

سلام دوست عزیز

مثل اینکه متلب نمی تونه فایل mex متناسب با سیستم عاملتون رو پیدا کنه، نمی دونم چرا این اتفاق میفته، متلب رو از مسیر نصب (فولدر bin) اجرا کنین، ببنین مشکل حل میشه. یه مشخصاتی از سیستموتون میدین، این دستور هم اجرا کنین، ببینین چی میده:

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

لینک به دیدگاه
این اطلاعات سیستم:

bd671kk9cnzeh0bj6bc9_thumb.png

 

ویندوز 8.1

 

اون دستور رو هم run کردم:

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

این Configuration Parameters dialog توی خط اول چیه هست، واسه خط قبلی هست؟

متلب رو از فولدر bin هم اجرا کردین، فایل matlab.exe داخل فولدر bin، توی این دو تا سایت گفته با اجرا از مسیر نصب مشکل حل میشه (فولدر bin، نه فولدر win64 داخلش). اولی با ف ی ل ت ر شکن باز میشه، دومی هم چینی هست اگه کروم داشته باشین، راست کلیک کنین Translate to english رو بزنین، ترجمه می کنه کل صفحه رو.

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

لینک به دیدگاه

متلب 2009 نصب کردم. error رفع شد اما بازم کمپایلری پیدا نمی کنه

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

 

حالا دارم این فایلی که لینکش رو گذاشتی دانلود می کنم ببینم چی میشه

لینک به دیدگاه
متلب 2009 نصب کردم. error رفع شد اما بازم کمپایلری پیدا نمی کنه

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

 

حالا دارم این فایلی که لینکش رو گذاشتی دانلود می کنم ببینم چی میشه

 

هر ورژن متلب کامپایلرهای خاصی رو ساپورت می کنه، که روی سایتش گفته شده، نمیشه از هر کامپایلری استفاده کرد، متلب 2009 هم

visual studio.net 2012 رو نمی شناسه، چون جدیدتر ازش هست.

اون چیزی که پست قبل گفتم رو امتحان کردین؟

لینک به دیدگاه
بله انجام دادم تاثیری نداشت. من لینک سایت متلب رو با چیزشکن هم نتونستم باز کنم.

میشه بگی چه کامپایلری باید نصب کنم؟

windows sdk جواب میده؟

 

برای 2009، نه خب جدیدتره، اینا رو سایت آورده:

 

[TABLE=class: datatable3, width: 100%]

[TR]

[TH=width: 30%]Compiler

[/TH]

[TH]Version[/TH]

[TH]MATLAB 7.9

(MEX, Engine, MAT-file Access)[/TH]

[TH]MATLAB 7.9

(Shared Library Interface) [/TH]

[TH]MATLAB

Compiler 4.11[/TH]

[TH]MATLAB

Builder NE

3.0.2[/TH]

[TH]MATLAB

Builder

JA 2.0.4[/TH]

[/TR]

[TR]

[TD=align: center]Intel C++ [/TD]

[TD=align: center]9.1 [/TD]

[TD=align: center]√[/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[/TR]

[TR=class: oddrow]

[TD=align: center]Intel Visual Fortran [/TD]

[TD=align: center]10.1 [/TD]

[TD=align: center]√[/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[/TR]

[TR]

[TD=align: center]Microsoft .NET Framework SDK[/TD]

[TD=align: center]2.0[/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center]√ [/TD]

[TD=align: center][/TD]

[/TR]

[TR=class: oddrow]

[TD=align: center]Microsoft Visual C++ 2008 SP1 [/TD]

[TD=align: center]9.0

Prof. Edition[/TD]

[TD=align: center]√[/TD]

[TD=align: center]√[/TD]

[TD=align: center]√[/TD]

[TD=align: center]√ [/TD]

[TD=align: center][/TD]

[/TR]

[TR]

[TD=align: center]Microsoft Visual C++ 2008 [/TD]

[TD=align: center]9.0

Express Edition[/TD]

[TD=align: center]√[/TD]

[TD=align: center][/TD]

[TD=align: center]√[/TD]

[TD=align: center]√ [/TD]

[TD=align: center][/TD]

[/TR]

[TR=class: oddrow]

[TD=align: center]Microsoft Visual C++ 2005 SP1 [/TD]

[TD=align: center]8.0

Prof. Edition[/TD]

[TD=align: center]√[/TD]

[TD=align: center]√[/TD]

[TD=align: center]√[/TD]

[TD=align: center]√ [/TD]

[TD=align: center][/TD]

[/TR]

[TR]

[TD=align: center]Sun Java Development Kit (JDK)[/TD]

[TD=align: center]1.5[/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center][/TD]

[TD=align: center]√[/TD]

[/TR]

[/TABLE]

لینک به دیدگاه
  • 5 ماه بعد...

سلام

من یه برنامه به زبان متلب دانلود کردم که یکی از توابعش mex فایل هست به اسم jpeg_read.mexa64

حالا که برنامه رو ران می کنم برام ارور میده که مربوط به این mex فایل هست، از طرفی نمیتونم این فایل رو باز کنم ببینم به چی ارور میده!

ممنون میشم راهنمایی بفرمایین:icon_gol:

لینک به دیدگاه
سلام

من یه برنامه به زبان متلب دانلود کردم که یکی از توابعش mex فایل هست به اسم jpeg_read.mexa64

حالا که برنامه رو ران می کنم برام ارور میده که مربوط به این mex فایل هست، از طرفی نمیتونم این فایل رو باز کنم ببینم به چی ارور میده!

ممنون میشم راهنمایی بفرمایین:icon_gol:

 

سلام

این فایل برای ویندوز های 64 بیتی (mexw64) نیست، واسه لینوکس هست، برای همین روی ویندوز اجرا نمیشه.

فایل mex رو نمیشه ادیت کرد، اگه سورس کدش رو داشته باشین، امکانش هست که بتونین فایل mex برای ویندوز خودتون رو ایجاد کنین، اگه کامپیالرش رو داشته باشین، توی کد هم از هدرهای مختص لینوکس استفاده نشده باشه، یا اینکه روی اینترنت ببینین فایل mexw64. وجود داره.

 

فایل mex یه فایل اجرایی هست، قابل ادیت کردن نیست.

لینک به دیدگاه

به گفتگو بپیوندید

هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .

مهمان
ارسال پاسخ به این موضوع ...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  تنها استفاده از 75 اموجی مجاز می باشد.

×   لینک شما به صورت اتوماتیک جای گذاری شد.   نمایش به صورت لینک

×   محتوای قبلی شما بازگردانی شد.   پاک کردن محتوای ویرایشگر

×   شما مستقیما نمی توانید تصویر خود را قرار دهید. یا آن را اینجا بارگذاری کنید یا از یک URL قرار دهید.

×
×
  • اضافه کردن...