Error Using Pdf Too Many Output Arguments
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of
How Many Arguments Does The "input" Function Expect To Receive? Python
this site About Us Learn more about Stack Overflow the company Business Learn
Error Using Alpha Too Many Output Arguments
more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question matlab function output x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up http://www.mathworks.co.uk/matlabcentral/answers/103242-matlab-too-many-output-arguments Matlab too many outputs up vote 0 down vote favorite The program myfile.m reads a txt file that contains a total of 25 names and numbers like exemple: John doughlas 15986 Filip duch 357852 and so on. The program converts them to 15986 Doughlas John 357852 duch Filip This is without function, with it I get too many outputs. Error message: Error using http://stackoverflow.com/questions/16015969/matlab-too-many-outputs disp Too many output arguments. Error in red4 (line 26) array = disp(All); Original code below: function array = myfile(~) if nargin == 0 dirr = '.'; end answer = dir(dirr); k=1; while k <= length(answer) if answer(k).isdir answer(k)=[]; else filename{k}=answer(k).name; k=k+1; end end chose=menu( 'choose file',filename); namn = char(filename(chose)); fid = fopen(namn, 'r'); R = textscan(fid,'%s %s %s'); x=-1; k=0; while x <= 24 x = k + 1; All = [R{3}{x},' ',R{1}{x},' ',R{2}{x}]; disp(All) k = k + 1; end fclose(fid); Now I have got many good answers from people and sites like functions but I cant get the results like the above with function. I have tried combining them and got some results: y = 15986 & [a,z,b] = myfile y = 25 & myfile = x y = numbers name1,2,3,4 and so one & myfile = fprintf(All) y = & I used results().namn, numbers name 1 & results().id, results().lastname y = numbers name 2 and so on. The result I want is: y = myfile y = 15986 Doughlas John 357852 duch Filip update: Change it like Eitan T said but did't get t
The team • Delete all board cookies • All times are UTC Powered by phpBB Forum Software © phpBB Group
be down. Please try the request again. Your cache administrator is webmaster. Generated Sat, 15 Oct 2016 01:53:28 GMT by s_wx1131 (squid/3.5.20)