How to use an array (saved as a mat file) in my C program?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hey there, I am trying to figure how to use a apecific array from my mat file. Unfortunately, I am not able to find the header file mat.h in the internet to check if my code it is actually working.
My mat file is called ma.mat and has only array called X(1:1024)
The following is my C-code:
#include "mat.h"
#include <stdio.h>
#include <stdlib.h>
int main () {
X = mxArray *matGetVariable(ma *mfp, X *name);
return(0);
}
댓글 수: 0
답변 (2개)
Jemima Pulipati
2021년 2월 19일
Hello,
From my understanding, you want to use the MAT file in the C program.
The following documentation links might help you to know more about the usage of MAT files in C/C++ programs.
댓글 수: 0
Reshma Nerella
2021년 2월 19일
Hi,
In addition to the above documentation links,
You might find this answer helpful: https://www.mathworks.com/matlabcentral/answers/47959-including-mat-h-and-using-in-a-c-program
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!