Error occured while importing ensemble table to diagnostic feature designer

조회 수: 7 (최근 30일)
Shabeeh Abbas
Shabeeh Abbas 2021년 3월 28일
답변: Xiaoxing Wang 2021년 4월 6일
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