-1

Alright let me explain detailed my question

this below image is displaying my matrix where i want to copy my data

enter image description here

Alright now what i want to do that is as you can see 1x4 cell i want to copy it as an array to another variable such as

    input_values=ones(1,4);%init
    input_values=input_matrix_training(1);

So at the above i am trying to copy the elements in that cell array which is row 1 to the input_values array. But if i do as i above i am getting this instead of the values that array contains. ty

enter image description here

instead of above it should be like

enter image description here

Charles
  • 50,943
  • 13
  • 104
  • 142
Furkan Gözükara
  • 22,964
  • 77
  • 205
  • 342

1 Answers1

0

The other values are a cell, and are thus best referenced with {} instead of (). Also, sometimes they need to be wrapped into [], depending on the format. Plus the fact that you don't need to initialize input_values, and what you should do becomes this:

input_values=[input_matrix_training{1}];

Or you can just use cell2mat

input_values=cell2mat(input_values(1));
PearsonArtPhoto
  • 38,970
  • 17
  • 111
  • 142