MATLAB Answers

0

I have two datasets and I want to put them in one struct

Asked by Taha Alars on 18 Apr 2019
Latest activity Commented on by Image Analyst
on 18 Apr 2019
the photo shows example of how I want to make the struct. basically I have cst1 & cst2 and I want to put them in one struct just like the photo(features & labels)
s.jpg

  0 Comments

Sign in to comment.

1 Answer

Answer by Image Analyst
on 18 Apr 2019

Try
s = load('cst1.mat');
data.cst1 = s.cst1;
s = load('cst2.mat');
data.cst2 = s.cst2;

  2 Comments

I am getting this erorr
Reference to non-existent field 'cst1'.
Error in Usdntitled (line 2)
data.cst1 = s.cst1;
Try
s = load('cst1.mat');
data.cst1 = s.data;
s = load('cst2.mat');
data.cst2 = s.data;

Sign in to comment.