# Overview
This code base exposes the C SDK by `ADInstruments <https://www.adinstruments.com/>`_
to MATLAB.
It allows you to read LabChart files into MATLAB and to create your own LabChart files.
**Only works with Windows. This is an ADInstruments issue. I can't fix it**
My less-polished Python version:
https://github.com/JimHokanson/adinstruments_sdk_python
If you want to control/interact with LabChart:
https://github.com/JimHokanson/labchart_server_matlab
# Motivation
LabChart provides functionality for exporting data to a '.mat' file, although I have yet to get it to work. I also prefer not having files that are simply copies of an original file but in a different format. This code allows reading data directly from LabChart data files.
# Top Level Functions
- adi.readFile : Reads a file
- adi.convert : Converts the a given file to another format (e.g. from .adicht to .mat)
# File Reading Notes
Like most of my more recent readers, the raw channel data are not returned unless specifically requested. Instead a lightweight (low memory) handle is returned with relevant meta data and the raw channel data can be requested via subsequent method calls.
```
f = adi.readFile;
pres_chan = f.getChannelByName('pressure');
raw_pres_data = pres_chan.getData(1); %Get data from the first record
```
At some point a function could be written that reads everything and reads it into a structure but this is really really low priority for me.
To read these files on a Mac first requires converting the 'adicht' format into a 'mat' format. Unfortunately, the way in which these files needs to be created leaves the mat file looking a bit ugly. Once however it is in the 'mat' format, it can be read via the code in the same way that the original 'adicht' file could.
```
f = adi.readFile('/Users/Jim/Work/example_file.mat');
```
If you want to extract all comments into table, do this:
```
t = adi.getFileComments
%or
t = adi.getFileComments('/Users/Jim/Work/example_file.mat')
```
# File Writing Notes
See [here for writing LabChart files](documentation/writing.md)
# Requirements & Installation
Requires 64bit MATLAB on Windows. 32bit Matlab could be supported but some of the mex code would need to be rewritten.
To install the package ('+adi') needs to be on the Matlab path (add parent folder of +adi folder). **Sub-folders of the package should not be added to the path.**
# Tech Notes #
General parts include:
- sdk class/package (see adi.sdk) - this is the Matlab code that directly interfaces with the mex code
- sdk_mex (see +adi/private directory) - this is the actual mex code which calls the ADInstruments dll
没有合适的资源?快使用搜索试试~ 我知道了~
使用Matlab读取LabChart.adicht文件-ADI仪器(LabChart)SDK-matlab
共85个文件
m:67个
md:6个
pdf:2个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 60 浏览量
2024-07-29
18:15:33
上传
评论
收藏 1.35MB ZIP 举报
温馨提示
ADI仪器(LabChart)SDK 使用Matlab读取LabChart.adicht文件 Implementation of AD Instruments SDK in Matlab
资源推荐
资源详情
资源评论
收起资源包目录
ADInstruments_matlab .zip (85个子文件)
files
blank_labchart_8_file.adicht 24KB
LabChartBinaryFormat.pdf 285KB
crash_testing.m 817B
documentation
writing.md 3KB
updating_mex_code.txt 455B
changes.md 303B
ADIDatToolkit.pdf 343KB
organization.md 1KB
ReadMe.md 0B
ReadMe.md 3KB
adi.m 4KB
+adi
+examples
conversion_speed_testing.m 1KB
e002_addCommentsToAnExistingFile.m 385B
e003_copyFile.m 113B
e001_writeFileFromScratch.m 1KB
getFileComments.m 1KB
file_writer.m 16KB
@comment
comment.m 9KB
@channel
exportToHDF5File.m 3KB
channel.m 22KB
documentation
FunctionMapping.csv 937B
com_interface_notes.m 4KB
mat_comment_handle.m 2KB
extractRecordToNewFile.m 2KB
+postp
mergeComments.m 3KB
file_comparison.m 919B
+tests
t001_speedWritingAndWriting.m 3KB
+file_comparison
@comments_comparison
comments_comparison.m 1KB
test_SDK.m 2KB
printFile.m 3KB
file.m 13KB
createFile.m 1KB
handle_logger.m 2KB
mat_conversion_options.m 2KB
convert.m 5KB
h5_file_sdk.m 2KB
mat_file_sdk.m 6KB
sdk.m 35KB
@plotter
plotter.m 22KB
@file_viewer
file_viewer.m 2KB
private
main.fig 1KB
handle_manager.m 6KB
+binary
file_writer.m 6KB
channel_writer.m 2KB
record.m 5KB
h5_conversion_options.m 832B
+sdk
ReadMe.md 100B
file_handle.m 1KB
+sl
+cellstr
contains.m 4KB
join.m 1KB
+stack
getMyBasePath.m 2KB
calling_function_info.m 2KB
getPackageRoot.m 506B
+in
process_varargin_result.m 4KB
processVarargin.m 7KB
+dir
fullfile.m 1KB
changeFileExtension.m 886B
filepartsx.m 621B
createFolderIfNoExist.m 1KB
+datetime
getTimeZone.m 687B
matlabToUnix.m 595B
unixToMatlab.m 1KB
+str
contains.m 2KB
+array
uniqueWithGroupIndices.m 2KB
+plot
+export
saveAsPDF.m 1KB
+io
mergePDFs.m 1KB
comment_handle.m 2KB
+w
@sample_count_manager
sample_count_manager.m 197B
editFile.m 431B
file_read_options.m 879B
data_writer_handle.m 649B
mat_file_h.m 1KB
channel_writer.m 3KB
private
sdk_mex.cpp 30KB
adi_example.cpp 5KB
ADIDatIOWin64.dll 1.74MB
c.m 57B
clong.m 182B
sdk_mex.mexw64 21KB
c0.m 121B
ADIDatIOWin64.lib 8KB
ADIDatCAPI_mex.h 24KB
plot.m 2KB
h5_file_h.m 4KB
readFile.m 2KB
共 85 条
- 1
资源评论
自不量力的A同学
- 粉丝: 789
- 资源: 2793
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功