从scilab读取数据 [英] read data from scilab

查看:235
本文介绍了从scilab读取数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

拜托,欢迎您的任何帮助,我是如何从Scilab读取Excel文件中的数据的,请给我详细信息,因为我不是scilab的新手,对我而言,没有什么显而易见的.非常感谢您的帮助:((,,和我的英语:-\"

Please, any help from you is welcome, how have I done to read data that is on an Excel file from Scilab, please give me the details as I am no novice in scilab ,nothing is obvious to me. Thank you very much for your help: (( ,"and excuse my english :-\ "

推荐答案

您已将问题标记为WinXP.我认为这意味着不是编程问题,而是有关如何使用文件的问题?

SCiLab似乎是一种晦涩的编程语言.您是说要将Excel文件读入SciLab吗?您是说SciLab已经生成了文件,并且您想读取它吗?我假设您的意思是您要将数据从SciLab导出到Excel文件中.对我来说,拥有.NET和COM支持的SciLab的几率很小.我想说的最好的方法是生成一个csv(即一个带有逗号分隔数据的文件,例如:1,4,5,7,2,7,9). Excel可以读取csv并将逗号转换为列,将换行符转换为行.
You tagged your question as WinXP. I assume this means this is not a programming question, but a question on how to use a file ?

SCiLab appears to be an obscure programming language. Do you mean you want to read an Excel file into SciLab ? Do you mean that SciLab has generated the file, and you want to read it ? I assume you mean you want to export data from SciLab into an Excel file. The odds of SciLab having .NET and COM support seem low to me. I''d say the best thing to do, is to generate a csv ( that is, a file with comma seperated data, like this : 1,4,5, 7, 2, 7, 9 ). Excel can read a csv and turns commans into columns and newlines into rows.


感谢您抽出宝贵的时间回答我,这次我将尝试更加精确.好吧,我的问题是在scilab5.2上以2d绘制曲线并将数据存储在2colonnes和100条线的excel文件中,因此我必须使用读取函数``xls_read'',但是此函数的参数是什么. ..如何使用它,是否有必要提供我的exel文件的路径?再次感谢您
thank you for taking the time to answer me,I''ll try to be more precise this time. well my problem is to draw a curve in 2d on scilab5.2 and data are stored in an excel file of 2colonnes and 100 lines, so i must use the read function''xls_read'', but what is the arguments of this function ... how it is used and is it necessary to give the path of my exel file? thank you again


阅读手册是个好主意……

提示:"Google"

xls_read —在Excel文件中读取工作表
通话顺序
[Value,TextInd] = xls_read(fd,Sheetpos)
参数
fd

一个数字,即xls_open返回的Excel流上的逻辑单元.
Sheetpos

一个数字:工作表开头在Excel流中的位置.此位置是xls_open返回的位置之一.


数字矩阵,即在工作表中找到的数字数据.没有数值数据的单元格由NaN值表示.
TextInd

与值具有相同大小的索引矩阵.索引0表示对应的Excel单元格中不存在任何字符串.正索引i指向字符串SST(i),其中SST由xls_open给出.
说明

该函数读取Excel工作表中给定逻辑单元的Excel工作表以及此工作流中工作表开头的位置.它返回数值数据和Excel单元格包含的字符串.

readxls函数可用于通过单个函数调用在一个函数中读取所有Excel文件.

警告仅处理BIFF8 Excel文件(最新的Excel文件版本)
例子

//解码ole文件,提取并打开Excel流
[fd,SST,Sheetnames,Sheetpos] = xls_open(''SCI/modules/spreadsheet/demos/xls/Test1.xls'')
//读取第一个数据表
[Value,TextInd] = xls_read(fd,Sheetpos(1))
//关闭电子表格流
mclose(fd)

另请参见
xls_open,readxls
It would be a good idea to read the manual......

Hint: "Google"

xls_read — read a sheet in an Excel file
Calling Sequence
[Value,TextInd] = xls_read(fd,Sheetpos)
Parameters
fd

a number, the logical unit on the Excel stream returned by xls_open.
Sheetpos

a number: the position of the beginning of the sheet in the Excel stream. This position is one of those returned by xls_open.
Value

a matrix of numbers, the numerical data found in the sheet. The cell without numerical data are represented by NaN values.
TextInd

a matrix of indices with the same size as Value. The 0 indices indicates that no string exists in the correspondin Excel cell. a positive index i points to the string SST(i) where SST is given by xls_open.
Description

This function reads an Excel sheet given a logical unit on an Excel stream ant the position of the beginning of the sheet within this stream. It returns the numerical data and the strings contained by the Excel cells.

The readxls function can be used to read all an Excel file in one function with a single function call.

Warning only BIFF8 Excel files (last Excel file version) are handled
Examples

//Decode ole file, extract and open Excel stream
[fd,SST,Sheetnames,Sheetpos] = xls_open(''SCI/modules/spreadsheet/demos/xls/Test1.xls'')
//Read first data sheet
[Value,TextInd] = xls_read(fd,Sheetpos(1))
//close the spreadsheet stream
mclose(fd)

See Also
xls_open , readxls


这篇关于从scilab读取数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆