필터 지우기
필터 지우기

import C code into matlab

조회 수: 13 (최근 30일)
Zeeshan
Zeeshan 2014년 5월 18일
댓글: James Tursa 2022년 9월 28일
i've a code in C. for visualization purpose i need to call my code into matlab. do i need to add some functions in my C code or i need to change it. or does their exist any converter that will help in converting my C code into the MEX file. please help anyone.

답변 (2개)

A Jenkins
A Jenkins 2014년 5월 19일
There are some well-documented examples here:
Another great place to start is to go into your MATLAB folder and look for extern\examples\mex. There are several examples there with source. You can learn by modifying these.

pasindu
pasindu 2022년 9월 28일
#include <stdio.h>
int main()
{
int num;
/* Input number from user */
printf("Enter any number: ");
scanf("%d", &num);
if(num > 0)
{
printf("Number is POSITIVE");
}
if(num < 0)
{
printf("Number is NEGATIVE");
}
if(num == 0)
{
printf("Number is ZERO");
}
return 0;
}
  댓글 수: 1
James Tursa
James Tursa 2022년 9월 28일
This code does not answer the question and has nothing to do with a mex file. Why are you posting irrelevant code to an 8 year old post?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Text Files에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by