Unable to write to Excel (Matlab) -


I have the following error: "undefined variable" try the results "or Class" Resultskxlsx "When I write output to an Excel spreadsheet of your code. Why am I iterations can not seem to understand this would be the case.

  function [final_matrix] = MCsolutionupdated () no_iterations = input ( 'no to? ") ; Thresh_strain = zeros (1, no_iterations * 16); casechoice = input ( 'for 1 Enter 1 for the layout and the second layout 2'); J = Nilsonwuveted (a Escois, No Maitereshn); thresh_strain = J; rounded value = round (thresh_strain / 0.0001) * 0.0001; myUniqueValues ​​= Unique (roundedValues); i = numel (myUniqueValues); nelements = hist (thresh_strain (:), myUniqueValues); I = L: I percent (i) = (nelements (1, I) / points (thresh_strain)) * 100; final Antim_matriks = [myUniqueValues ​​'percentage']; xlswrite (result. Xlsx, Antim_matriks);% problem  

you need to put the file name in the Q uotes ( ' '):

  xlswrite (' results.xlsx ', final_matrix);  

Comments