⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getdata.m

📁 matlab进行不确度计算
💻 M
字号:
function [AA,n]=GetData(strDatabase) 
%GetData Imports data into Matlab from a database. 
timeoutA=logintimeout(5) ;

% Connect to a database. 
%打开数据源 strDatabase 
connA=database(strDatabase,'','') ;

% if connA.AutoCommit=='off'
%     AA=[];
%     n=0;
%     return;
% end
% Open cursor and execute SQL statement. 
%执行SQL查询语句 
cursorA=exec(connA,'select input_data from input2'); 

% Fetch the all rows of data. 
%获取所有行数据 
cursorA=fetch(cursorA) ;

%获取行数
n = rows(cursorA);

% Return the data. 
%数据
AA=cursorA.Data{:};

AA= AA';

% Close the cursor and the connection. 
%关闭 
close(cursorA) ;
close(connA);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -