Error occured while importing ensemble table to diagnostic feature designer

7 visualizzazioni (ultimi 30 giorni)
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 Commento
Shabeeh Abbas
Shabeeh Abbas il 28 Mar 2021
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."

Accedi per commentare.

Risposte (1)

Xiaoxing Wang
Xiaoxing Wang il 6 Apr 2021
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

Categorie

Scopri di più su Manage System Data in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by