MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   求教!matlab能读取yaml文件吗? (https://www.labfans.com/bbs/showthread.php?t=3653)

soliddream 2008-06-18 09:53

求教!matlab能读取yaml文件吗?
 
RT~
听说能支持xml(不知道如何支持的)
目前我采用 fopen打开文件,textscan读取字符串到str,然后用如下形式str{1,1}{4,1}(2)读取字符:sweat: 接下来如何读取数据就要自定义一个规则了~

顺便问一下,matlab里面能判断数据类型吗?比如字符串 , 整数 , 小数之类的

谢谢了~

fanxing39 2008-06-18 23:56

[SIZE="4"]哇! 一出手就问这么有难度的问题呀,呵呵 :tongue:

读数据都是 用load 命令的,你可以看下 load 的帮助命令![/SIZE]

soliddream 2008-06-24 09:15

load貌似不行啊,看了下说明只接受ascii和mat两种格式文件

load yml.yml
??? Error using ==> load
Number of columns on line 2 of ASCII file C:\Users\ADMINSTRATION\Documents\MATLAB\yml.yml
must be the same as previous lines.
说明说If filename has an extension other than .mat, load treats the file as ASCII data.估计是把这种文件名当ASCII格式读的时候出错。

另外我看matlab支持xml的命令是xmlread,xmlwrite,xslt


所有时间均为北京时间。现在的时间是 12:30

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.