Error occured while importing ensemble table to diagnostic feature designer

10 次查看(过去 30 天)
MAF and O2 are the sensors i'm using in my project and i have made ensemble table of which includes timetables of MAF and O2 sensors along with a column of fault codes as directed in the documentation. But as soon as i'm importing the table in the diagnostic feature designer i'm not able to obtain the source variable pane as shown by the documentation, image given below. Plz can anyone help me with this i'm worried
r
  1 个评论
Shabeeh Abbas
Shabeeh Abbas 2021-3-28
I also tried to change the essemble table into an array to resolve the problem but the following error popped up
"Error using table2array (line 37)
Unable to concatenate the table variables 'MAF' and 'Faultcode', because their types are cell and
table."

请先登录,再进行评论。

回答(1 个)

Xiaoxing Wang
Xiaoxing Wang 2021-4-6
The icons tell that your inputs 'Data', 'o2', and 'Faultcode' are independent variables.
You need to reconstruct 'Data' and 'o2' to match Data variables, and 'Faultcode' to match Condition variables so that your MAF and O2 become 'Signal data'.
You can import 'sampleData' as shown below to identify the difference between data types, i.e. icons.
clear; clc;
format short;
format compact;
close all;
rng('default');
%% Data preparation; two channels and 3 classes for faultCode
measurementLength = 100;
measurementDays = 50;
% Initialization
sz = [measurementDays,3];
varTypes = {'datetime','cell','categorical'};
varNames = {'date','data','faultCode'};
sampleData = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
% Timestamp
dateval = datetime('now','Format','yyyy/MM/dd');
% faultCode
A = randi(3,measurementDays,1);
faultCode = categorical(A,[1,2,3],{'x','y','z'});
for day = 1:measurementDays
%* Generate timetable
var1 = rand(measurementLength,1);
var2 = rand(measurementLength,1);
measurementTime = seconds(1:measurementLength);
measurementTime = measurementTime(:);
tt = timetable(measurementTime, var1, var2);
%* Encapsulate timetable to table
dateval = dateval+days(day-1);
sampleData.date(day) = dateval;
sampleData.data(day) = {tt};
sampleData.faultCode(day) = faultCode(day);
end

类别

Help CenterFile Exchange 中查找有关 Manage System Data 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by