I am trying to acces multiple fields in an struct to change the data from datenum to datetime. The struct is created by:
DATA=struct('Id',[],'Date',[],'Value',[]);
and due to the style of receiving the Data, there are multiple DATA with each having one Value. So a sufficent example would be
Data(1).Date=2;
Data(2).Date=3;
now i would like to change the entry to datetime but leaving the data structure as it is. FOr the example lets say to square the date to.
Data(1).Date=4;
Data(2).Date=9;
The struct has about 50000 enries and arrayfun() does not give an efficient enough solution. I cant find a way to convert the entire array of Data.Date ad once deal() write all 50000 dates in each field and in every other way i receive errors. Does someone has a solution to change the entire array and write it back in each Field of the array?