How to add sequence data into a sequence database
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I wish to add new data into a sequence database (49x1 cell). I have the database created as presented below from dataset D2 (72x6). I wish to add new dataset D3(72x6) into the seqhence database to have (121x1 cells). Please How do I proceed. I am a novice at the moment.
clear,clc;
L1 = xlsread("D2.xlsx")
Q= flip(L1)
A= Q(:,1)
B= Q(:,2)
C= Q(:,3)
D= Q(:,4)
E= Q(:,5)
F= Q(:,6)
[row colo]= size(Q)
SequenceLength= 24;
Database= {};
resultDatabase =[];
count=0;
for i= row:-1: SequenceLength
count=count+1;
a1 = A(i-SequenceLength+1:i)';
a2 = B(i-SequenceLength+1:i)';
a3 = C(i-SequenceLength+1:i)';
a4 = D(i-SequenceLength+1:i)';
a5 = E(i-SequenceLength+1:i)';
a6 = F(i-SequenceLength+1:i)';
Database{count,1}=[a1;a2;a3;a4;a5;a6]
end
[rt,ct] = size(Database)
count=0;
for i=1: rt-1
count=count+1;
a5= Database{count+1,1};
resultDatabase(count,1)= a5(5,end);
end
LDatabase = Database;
save LDatabase
1 comentario
Jon
el 14 de Jul. de 2023
I can't follow from initial explanation and your code what you are actually trying to accomplish. Can you please provide a simple example illustrating what are your inputs, and what is your desired output.
Respuestas (0)
Ver también
Categorías
Más información sobre Database Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!