I am trying to figure out to format the numbers in the uitable to have thousands seperator. I am adding this undocumentd java code lines to achive it but gives me the below error. I can tell if i m using the undocumented code wrong or not? I appreciate any help on this.
c = tp(:,1);c(1,:)=[];g = spend_and_elas(:,1); inf=java.text.DecimalFormat; ho=char(inf.format(hist_out)); hr=char(inf.format(hist_rev));k=grps(:,1);k(1,:)=[];k(:,2)=num2cell(ho);% k(:,2)= mat2cell(ho);
k(:,3)=num2cell(hr);set(handles.tpoints,'data',[ c num2cell(g)]);set(handles.model,'data',k);
Assignment has more non-singleton rhs dimensions than non-singleton subscripts
Error in Top_Down_Optimizer_vn>pushbutton_Load_Data_vn_Callback (line 122)k(:,2)=num2cell(ho);
Best Answer