Hi, I have the following code:
opts = detectImportOptions(fullfile(file_B_path, file_B_name)); % Detects import of table opts = setvartype(opts, 'ID', 'string'); % Sets ID to string datatype opts = setvartype(opts, 'RvCCompliance', 'string'); % Sets RvC Compliance to string datatype ---> opts.VariableNamingRule = 'modify'; file_B = readtable(fullfile(file_B_path, file_B_name),opts); % Imports table
and I keep getting the following warning:
Warning: Column headers from the file were modified to make them valid MATLAB identifiers before creating variable names for the table. The original column headers are saved in the VariableDescriptions property. Set 'VariableNamingRule' to 'preserve' to use the original column headers as table variable names.
I know that variablenamingrule is set to modify, in fact, I want it to be set to modify. Why wont adding the line with the pointer get rid of this messege ?
opts = detectImportOptions(fullfile(file_B_path, file_B_name)); % Detects import of table opts = setvartype(opts, 'ID', 'string'); % Sets ID to string datatype opts = setvartype(opts, 'RvCCompliance', 'string'); % Sets RvC Compliance to string datatype w=warning('off','MATLAB:table:ModifiedAndSavedVarnames'); % turn off annoying warning, save state file_B = readtable(fullfile(file_B_path, file_B_name),opts); % Imports table warning(w); % reset warning level
Since 'modify' is the default state for the name preservation property, it doesn't need to be set in the options struct and makes no difference if it is (as you've seen).
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.