Error occured while importing ensemble table to diagnostic feature designer

7 次查看(过去 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
  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


回答(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;
%% 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); = dateval; = {tt};
sampleData.faultCode(day) = faultCode(day);

Community Treasure Hunt

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

Start Hunting!

Translated by