Error using save, too many output arguments – don’t know how to fix.
Hi y’all
I am trying to save multiple tables I’ve edited in matlab, but I get this error:
Error using save
Too many output arguments.
I’m having trouble figuring out how to fix this. The code it’s probably referring to is:
function [output] = save_on_Computer(ReferenceData, month, day)
file_name = "OL_"+month+"_"+day+".csv" ;
savefile = save(file_name) ;
output = savefile ;
end
from the full code here:
% Pull data from files
function [output] = each_day_table(month, day)
fileNames = sprintf(‘D2024%02d%02d*.csv’, month, day) ;
datastore_result = datastore(fileNames) ;
original_data = readall(datastore_result) ;
output = original_data ;
end
% Find Where Equivilant Diamiter > 150 And Remove (ICB measures b/w 2 – 150 μm)
function [output] = remove_150(original)
new = original ;
Greater150 = original.EquivDiameter > 150 ;
new(Greater150, 🙂 = [] ;
output = new ;
end
% To Save Each Newly Made File Onto Computer
function [output] = save_on_Computer(ReferenceData, month, day)
file_name = "OL_"+month+"_"+day+".csv" ;
savefile = save(file_name) ;
output = savefile ;
end
function [output] = do_everything(year, month, day)
original_data = each_day_table(month, day) ;
data_lessthan_150 = remove_150( original_data) ;
save_to_folder = save_on_Computer(data_without_zeroes, month, day) ;
output = save_on_Computer ; % change data_with_surface_area with data_with_ratio
end
OL_06_03 = do_everything (2024,06,03) ;
OL_06_04 = do_everything (2024,06,04) ;
OL_06_05 = do_everything (2024,06,05) ;
OL_06_06 = do_everything (2024,06,06) ;Hi y’all
I am trying to save multiple tables I’ve edited in matlab, but I get this error:
Error using save
Too many output arguments.
I’m having trouble figuring out how to fix this. The code it’s probably referring to is:
function [output] = save_on_Computer(ReferenceData, month, day)
file_name = "OL_"+month+"_"+day+".csv" ;
savefile = save(file_name) ;
output = savefile ;
end
from the full code here:
% Pull data from files
function [output] = each_day_table(month, day)
fileNames = sprintf(‘D2024%02d%02d*.csv’, month, day) ;
datastore_result = datastore(fileNames) ;
original_data = readall(datastore_result) ;
output = original_data ;
end
% Find Where Equivilant Diamiter > 150 And Remove (ICB measures b/w 2 – 150 μm)
function [output] = remove_150(original)
new = original ;
Greater150 = original.EquivDiameter > 150 ;
new(Greater150, 🙂 = [] ;
output = new ;
end
% To Save Each Newly Made File Onto Computer
function [output] = save_on_Computer(ReferenceData, month, day)
file_name = "OL_"+month+"_"+day+".csv" ;
savefile = save(file_name) ;
output = savefile ;
end
function [output] = do_everything(year, month, day)
original_data = each_day_table(month, day) ;
data_lessthan_150 = remove_150( original_data) ;
save_to_folder = save_on_Computer(data_without_zeroes, month, day) ;
output = save_on_Computer ; % change data_with_surface_area with data_with_ratio
end
OL_06_03 = do_everything (2024,06,03) ;
OL_06_04 = do_everything (2024,06,04) ;
OL_06_05 = do_everything (2024,06,05) ;
OL_06_06 = do_everything (2024,06,06) ; Hi y’all
I am trying to save multiple tables I’ve edited in matlab, but I get this error:
Error using save
Too many output arguments.
I’m having trouble figuring out how to fix this. The code it’s probably referring to is:
function [output] = save_on_Computer(ReferenceData, month, day)
file_name = "OL_"+month+"_"+day+".csv" ;
savefile = save(file_name) ;
output = savefile ;
end
from the full code here:
% Pull data from files
function [output] = each_day_table(month, day)
fileNames = sprintf(‘D2024%02d%02d*.csv’, month, day) ;
datastore_result = datastore(fileNames) ;
original_data = readall(datastore_result) ;
output = original_data ;
end
% Find Where Equivilant Diamiter > 150 And Remove (ICB measures b/w 2 – 150 μm)
function [output] = remove_150(original)
new = original ;
Greater150 = original.EquivDiameter > 150 ;
new(Greater150, 🙂 = [] ;
output = new ;
end
% To Save Each Newly Made File Onto Computer
function [output] = save_on_Computer(ReferenceData, month, day)
file_name = "OL_"+month+"_"+day+".csv" ;
savefile = save(file_name) ;
output = savefile ;
end
function [output] = do_everything(year, month, day)
original_data = each_day_table(month, day) ;
data_lessthan_150 = remove_150( original_data) ;
save_to_folder = save_on_Computer(data_without_zeroes, month, day) ;
output = save_on_Computer ; % change data_with_surface_area with data_with_ratio
end
OL_06_03 = do_everything (2024,06,03) ;
OL_06_04 = do_everything (2024,06,04) ;
OL_06_05 = do_everything (2024,06,05) ;
OL_06_06 = do_everything (2024,06,06) ; save, error MATLAB Answers — New Questions