{"text": "function [position0,position,messages]= delineate3D(w1,w2,w3,intreg,timenew,position0,position,intervalo,position1,position2,position3,indexes,samp,sig,messages)\n%\n%\n% [position0,position,A,V,A2,V2]= delineate3D(w1,w2,w3,intreg,scale,timenew,position0,position,intervalo,position1,samp)\n% 3D multilead delineation of T wave\n%\n% Input Parameters:\n%   w1: matrix with WT scales 1 to 5 for lead 1\n%   w2: matrix with WT scales 1 to 5 for lead 2\n%   w3: matrix with WT scales 1 to 5 for lead 1\n%  intreg: interval to be considered in fitting the optimal direction\n%  scale to use in delineation\n%   timenew:  QRS times in inedexes refering the interval included in the current excerpt (borders excluded)\n%   position0: struct vector with the detected points for 3D multilead  step1\n%   position: struct vector with the detected points for 3D multilead  step2\n%   position1: struct vector with the detected points for lead1 - to be replaced for multilead marks\n%   samp: samples included in the current excerpt (borders excluded)\n%   intervalo: numeration of the beats processed in this segment\n%\n%Output Parameters:\n%   actualized parameters: position, position0\n% A - points of fitted lines in step 1\n% A2 - points of fitted lines in step 2\n%  V- vectors director to the fitted line\n%  V2- vectors director to the fitted line\n%\n% Rute Almeida: trabalho de doutoramento 2.Dec.2004\n% Last update: 05AGO2011\n%\n% MATLAB Version 6.5.0.180913a (R13)\n\nglobal recursioncount OPT\nA=[];A2=[];\nV=[];V2=[];\nif isempty(sig)\n    \nend\n% Aon=[];Von=[];\n% Vg=[];\n% if nargin==15\n% messages = new_empty_mesg;\n% end\nif ~isfield(messages.setup.wavedet,'rrant_mintol')\n    messages.setup.wavedet.rrant_mintol  =  0.5;    % minimum time in sec admited for current RR to be used in T wave delineation or in Exponentially averaged RR\nend\nif ~isfield(messages.setup.wavedet,'rrant_maxtol')\n    messages.setup.wavedet.rrant_maxtol  =  1.5;    % max time in sec admited for current RR to be used in Exponentially averaged RR\nend\nif ~isfield(messages.setup.wavedet,'rrant_average')\n    messages.setup.wavedet.rrant_average  =  [0.8 0.2];    % Exponentially averaged RR weights\nend\nif ~isfield(messages.setup.wavedet,'scale')\n    messages.setup.wavedet.scale=4;\nend\nif ~isfield(messages.setup.wavedet,'scale2')\n    messages.setup.wavedet.scale2=5;\nend\nif ~isfield(messages.setup.wavedet,'T_CSE_tol')\n    messages.setup.wavedet.T_CSE_tol=30.6*2/1000; % based on CSE tolerance\nend\nif ~isfield(messages.setup.wavedet,'Tconvergence_crit')\n    messages.setup.wavedet.Tconvergence_crit=1; % 1 maks are acepted as the same if they difer by Tconvergence_crit\nend\n\nrrant_mintol=messages.setup.wavedet.rrant_mintol;\nrrant_maxtol=messages.setup.wavedet.rrant_maxtol;\nrrant_average=messages.setup.wavedet.rrant_average;\nscale=messages.setup.wavedet.scale;\nscale2=messages.setup.wavedet.scale2;\nTconvergence_crit=messages.setup.wavedet.Tconvergence_crit;\n\nintervalo=intervalo(1):intervalo(end);\n\nscalei=scale*ones(1,size(intreg,1));\nif ~isempty(w3)\n    %scalei(sum([position1.Tscale(intervalo);position2.Tscale(intervalo);position3.Tscale(intervalo)]==5)>1)=5;\n    %Rute 17Mar06\n    aux=[(indexes(1,intervalo));(indexes(2,intervalo));(indexes(3,intervalo))];\n    aux(1,~isnan(aux(1,:)))=position1.Tscale(aux(1,~isnan(aux(1,:))));\n    aux(2,~isnan(aux(2,:)))=position2.Tscale(aux(2,~isnan(aux(2,:))));\n    aux(3,~isnan(aux(3,:)))=position3.Tscale(aux(3,~isnan(aux(3,:))));\n    scalei(sum(aux==5)>1)=5;\n    %%%%%%\nelse\n    scalei(sum([position1.Tscale(intervalo);position2.Tscale(intervalo)]==scale2)>1)=scale2;\nend\n\nfor i=1:size(intreg,1)\n\n    if isnan(intreg(i,1))\n        position.Tscale(intervalo(i))=NaN;\n        position.Toff(intervalo(i))=NaN;\n        position.T(intervalo(i))=NaN;\n        position.Ttipooff(intervalo(i))=NaN;\n        position.Ttipo(intervalo(i))=NaN;\n        position.Tprima(intervalo(i))=NaN;\n        position.Ton(intervalo(i))=NaN;\n        position.Ttipoon(intervalo(i))=NaN;\n    else\n\n        scale=scalei(i);\n        %marks taken as the last in the 3 leads\n\n        aux2=find(~isnan(indexes(2,intervalo(i))));\n        aux3=find(~isnan(indexes(3,intervalo(i))));\n        S=max([position1.S(indexes(~isnan(indexes(1,intervalo(i))),intervalo(i))) position2.S(indexes(2*aux2,intervalo(i))) position3.S(indexes(3*aux3,intervalo(i))) ]-samp(1)+1);\n        QRSoff=max([position1.QRSoff(indexes(~isnan(indexes(1,intervalo(i))),intervalo(i))) position2.QRSoff(indexes(2*aux2,intervalo(i))) position3.QRSoff(indexes(3*aux3,intervalo(i)))]-samp(1)+1);\n\n        if ~isempty(w3)\n            pontos=[w1(intreg(i,1):min(intreg(i,2),length(w1)),scale) w2(intreg(i,1):min(intreg(i,2),length(w2)),scale) w3(intreg(i,1):min(intreg(i,2),length(w3)),scale) ];\n        else\n            pontos=[w1(intreg(i,1):min(intreg(i,2),length(w1)),scale) w2(intreg(i,1):min(intreg(i,2),length(w2)),scale)];\n        end\n        weight=ones(size(pontos,1),1);\n        [a,v] = optimline(pontos, weight,OPT);\n\n        A=[A;a]; %#ok<AGROW>\n        V=[V;v]; %#ok<AGROW>\n    \n\n        %4FEB2010\n        if length(intervalo)>1\n            rrant=position.qrs(intervalo(2))-position.qrs(intervalo(1));\n        elseif intervalo(1)>1\n            rrant=position.qrs(intervalo(1))-position.qrs(intervalo(1)-1);\n        else\n            rrant=messages.setup.wavedet.freq/2; %JUL2011\n        end\n\n        if (i>1),\n            if (rrant_maxtol*rrant>(timenew(i)-timenew(i-1)))&&(timenew(i)-timenew(i-1)>rrant_mintol*rrant),\n                rrmed = rrant_average(1)*rrant + rrant_average(2)*(timenew(i)-timenew(i-1));\n            else\n                rrmed = rrant;  % Exponentially averaged RR\n            end\n        else                  % Only for the first in each segment of the ECG\n            rrmed = rrant;\n        end\n        rrant = rrmed;        %#ok<NASGU> % For next segment\n\n        %WT projected: from the previous QRS complex to the following QRS complex\n        if ~isempty(w3)\n            if i<length(timenew),\n                newleadbeat=(w1(timenew(i):timenew(i+1),scale).*v(1)+w2(timenew(i):timenew(i+1),scale)*v(2)+w3(timenew(i):timenew(i+1),scale)*v(3))./norm(v);\n                %signew=(sig(timenew(i):timenew(i+1),1).*v(1)+sig(timenew(i):timenew(i+1),2)*v(2)+sig(timenew(i):timenew(i+1),3)*v(3))./norm(v);\n            else                        % if last beat of the segment\n                newleadbeat=(w1(timenew(i):end,scale).*v(1)+w2(timenew(i):end,scale)*v(2)+w3(timenew(i):end,scale)*v(3))./norm(v);\n                %signew=(sig(timenew(i):end,1).*v(1)+sig(timenew(i):end,2)*v(2)+sig(timenew(i):end,3)*v(3))./norm(v);\n            end\n        else\n            if i<length(timenew),\n                newleadbeat=(w1(timenew(i):timenew(i+1),scale).*v(1)+w2(timenew(i):timenew(i+1),scale)*v(2))./norm(v);\n                %signew=(sig(timenew(i):timenew(i+1),1).*v(1)+sig(timenew(i):timenew(i+1),2)*v(2))./norm(v);\n            else                        % if last beat of the segment\n                newleadbeat=(w1(timenew(i):end,scale).*v(1)+w2(timenew(i):end,scale)*v(2))./norm(v);\n                %signew=(sig(timenew(i):end,1).*v(1)+sig(timenew(i):end,2)*v(2))./norm(v);\n            end\n        end\n        [pos,picon,picoff,janelas1,messages]=twave3D( newleadbeat,timenew,i,messages.setup.wavedet.freq,S,QRSoff,samp,rrmed,messages); %#ok<ASGLU>\n%         janelas1=janelas1+timenew(i)-1;\n        position0.Tscale(intervalo(i))=scale;\n        position0.Ton(intervalo(i))=pos.Ton;\n        position0.Toff(intervalo(i))=pos.Toff;\n        position0.T(intervalo(i))=pos.T;\n        position0.Ttipo(intervalo(i))=pos.Ttipo;\n        position0.Tprima(intervalo(i))=pos.Tprima;\n        \n        %position0.Wavedet(intervalo(i))=newleadbeat; % derivada wavedet Maikel 30 marzo 2009\n        %position0.direccion(c)=V; % vector direcci\ufffdn Maikel 30 marzo 2009\n        %pontos2=[w1(picoff:intreg(i,2),scale) w2(picoff:intreg(i,2),scale) w3(picoff:intreg(i,2),scale) ];\n\n        if ~isnan(picoff)\n            if picoff>(intreg(i,2)-1)\n                messages.warnings=[messages.warnings {'Tend out of the searching interval, in the fist step of multilead!'}];\n                position.Tscale(intervalo(i))=NaN;\n                position.Toff(intervalo(i))=NaN;\n                position.T(intervalo(i))=NaN;\n                position.Ttipooff(intervalo(i))=NaN;\n                position.Ttipo(intervalo(i))=NaN;\n                position.Tprima(intervalo(i))=NaN;\n                recursioncount.Toff(intervalo(i))=NaN;\n                position.contadorToff(intervalo(i))=NaN; %Rute\n            else\n                if (pos.Toff-samp(1)+1)==picoff\n                    endaux=min([(position0.Toff(intervalo(i))-samp(1)+1+round(messages.setup.wavedet.T_CSE_tol*messages.setup.wavedet.freq)) length(w1)]); %3JUL\n\n                else\n                    endaux=min([intreg(i,2) (position0.Toff(intervalo(i))-samp(1)+1+messages.setup.wavedet.T_CSE_tol*messages.setup.wavedet.freq) ]);\n                end\n                if ~isempty(w3)\n                    pontos2=[w1(picoff:endaux,scale) w2(picoff:endaux,scale) w3(picoff:endaux,scale)];\n                    %pontos2=[w1(janelas1(2):janelas1(3),scale) w2(janelas1(2):janelas1(3),scale) w3(janelas1(2):janelas1(3),scale)];\n                else\n                    pontos2=[w1(picoff:endaux,scale) w2(picoff:endaux,scale)];\n                end\n                weight2=ones(size(pontos2,1),1);\n                [a,v] = optimline(pontos2, weight2,OPT);\n                A2=[A2;a]; %#ok<AGROW>\n                V2=[V2;v]; %#ok<AGROW>\n                if ~isempty(w3)\n                    if i<length(timenew),\n                        newleadbeat2=(w1(timenew(i):timenew(i+1),scale).*v(1)+w2(timenew(i):timenew(i+1),scale)*v(2)+w3(timenew(i):timenew(i+1),scale)*v(3))./norm(v);\n                        %signew2=(sig(timenew(i):timenew(i+1),1).*v(1)+sig(timenew(i):timenew(i+1),2)*v(2)+sig(timenew(i):timenew(i+1),3)*v(3))./norm(v);\n                    else                        % if last beat of the segment\n                        newleadbeat2=(w1(timenew(i):end,scale).*v(1)+w2(timenew(i):end,scale)*v(2)+w3(timenew(i):end,scale)*v(3))./norm(v);\n                        %signew2=(sig(timenew(i):end,1).*v(1)+sig(timenew(i):end,2)*v(2)+sig(timenew(i):end,3)*v(3))./norm(v);\n                    end\n                else\n                    if i<length(timenew),\n                        newleadbeat2=(w1(timenew(i):timenew(i+1),scale).*v(1)+w2(timenew(i):timenew(i+1),scale)*v(2))./norm(v);\n                        %signew2=(sig(timenew(i):timenew(i+1),1).*v(1)+sig(timenew(i):timenew(i+1),2)*v(2))./norm(v);\n                    else                        % if last beat of the segment\n                        newleadbeat2=(w1(timenew(i):end,scale).*v(1)+w2(timenew(i):end,scale)*v(2))./norm(v);\n                        %signew2=(sig(timenew(i):end,1).*v(1)+sig(timenew(i):end,2)*v(2))./norm(v);\n                    end\n                end\n                [pos,picon2,picoff2,janelas2,messages]=twave3D(newleadbeat2,timenew,i,messages.setup.wavedet.freq,S,QRSoff,samp,rrmed,messages); %#ok<ASGLU>\n%                 janelasnew=janelas2+timenew(i)-1;\n                picoffall=[picoff picoff2];\n                if isnan(picoff2)\n                    amppicoffall=[abs(newleadbeat(picoff-timenew(i)+1)) NaN];\n                else\n                    amppicoffall=[abs(newleadbeat(picoff-timenew(i)+1)) abs(newleadbeat2(picoff2-timenew(i)+1))];\n                end\n                newToff=[position0.Toff(intervalo(i)) pos.Toff];\n\n                if (amppicoffall(end)<amppicoffall(end-1))\n                    position.contadorToff(intervalo(i))=-1;\n                    %Vg(i,:)=V(end,:);\n                    position.Tscale(intervalo(i))=position0.Tscale(intervalo(i));\n                    position.Toff(intervalo(i))=position0.Toff(intervalo(i));\n                    position.T(intervalo(i))= position0.T(intervalo(i));\n                    position.Ttipooff(intervalo(i))=position0.Ttipo(intervalo(i));\n                    position.Ttipo(intervalo(i))=NaN;\n                    position.Tprima(intervalo(i))=position0.Tprima(intervalo(i));\n                    %position.contadorToff=recursioncount.Toff;\n                    position.direccionToffopt(:,intervalo(i))=V(end,:);\n                    %position.Wavedet(intervalo(i))=newleadbeat2; % derivada wavedet Maikel 30 marzo 2009\n                    %position.direccion(:,intervalo(i))=V2; % vector direcci\ufffdn Maikel 30 marzo 2009\n                else\n                    position.contadorToff(intervalo(i))=0;\n                    %Vg(i,:)=V2(end,:);\n                    position.direccionToffopt(:,intervalo(i))=V2(end,:);\n                    %%%%%%%%%%%%%%%%%%%%%%recursion\n                    while (~isnan(picoffall(end)) &&  abs(newToff(end)-newToff(end-1))>Tconvergence_crit) && (amppicoffall(end)>amppicoffall(end-1))\n                        position.contadorToff(intervalo(i))=position.contadorToff(intervalo(i))+1;\n                        %maxTintervalend=maxTintervalend; % teste 14\n                        if (pos.Toff-samp(1)+1)==picoff\n                            endaux=(pos.Toff-samp(1)+1+round(messages.setup.wavedet.T_CSE_tol*messages.setup.wavedet.freq));\n                        else\n                            endaux=min([intreg(i,2) (pos.Toff-samp(1)+1+round(messages.setup.wavedet.T_CSE_tol*messages.setup.wavedet.freq))]);\n                        end\n                        if ~isempty(w3)\n                            pontosnew=[w1(picoffall(end):endaux,scale) w2(picoffall(end):endaux,scale) w3(picoffall(end):endaux,scale)];\n                            %pontosnew=[w1(picoff(end):endaux,scale) w2(picoff(end):endaux,scale) w3(picoff(end):endaux,scale)];\n                            %pontosnew=[w1(janelasnew(2):janelasnew(3),scale) w2(janelasnew(2):janelasnew(3),scale) w3(janelasnew(2):janelasnew(3),scale)];\n                        else\n                            pontosnew=[w1(picoffall(end):endaux,scale) w2(picoffall(end):endaux,scale)];\n                        end\n\n                        if   size(pontosnew,1)>1\n                            weightnew=ones(size(pontosnew,1),1);\n                            [a,v] = optimline(pontosnew, weightnew,OPT);\n%                             if i==6\n%                                 title([ecgnr '(Tend-step' num2str(2+position.contadorToff(intervalo(i)))')'])\n%                             else\n%                                 close\n%                             end\n                            A2=[A2;a]; %#ok<AGROW>\n                            V2=[V2;v]; %#ok<AGROW>\n                            if ~isempty(w3)\n                                if i<length(timenew),\n                                    newleadbeatnew=(w1(timenew(i):timenew(i+1),scale).*v(1)+w2(timenew(i):timenew(i+1),scale)*v(2)+w3(timenew(i):timenew(i+1),scale)*v(3))./norm(v);\n                                    %signewnew=(sig(timenew(i):timenew(i+1),1).*v(1)+sig(timenew(i):timenew(i+1),2)*v(2)+sig(timenew(i):timenew(i+1),3)*v(3))./norm(v);\n                                else                        % if last beat of the segment\n                                    newleadbeatnew=(w1(timenew(i):end,scale).*v(1)+w2(timenew(i):end,scale)*v(2)+w3(timenew(i):end,scale)*v(3))./norm(v);\n                                    %signewnew=(sig(timenew(i):end,1).*v(1)+sig(timenew(i):end,2)*v(2)+sig(timenew(i):end,3)*v(3))./norm(v);\n                                end\n                            else\n                                if i<length(timenew),\n                                    newleadbeatnew=(w1(timenew(i):timenew(i+1),scale).*v(1)+w2(timenew(i):timenew(i+1),scale)*v(2))./norm(v);\n                                    %signewnew=(sig(timenew(i):timenew(i+1),1).*v(1)+sig(timenew(i):timenew(i+1),2)*v(2))./norm(v);\n                                else                        % if last beat of the segment\n                                    newleadbeatnew=(w1(timenew(i):end,scale).*v(1)+w2(timenew(i):end,scale)*v(2))./norm(v);\n                                    %signewnew=(sig(timenew(i):end,1).*v(1)+sig(timenew(i):end,2)*v(2))./norm(v);\n                                end\n                            end\n\n                            [pos,picon2,picoffnew,janelasnew,messages]=twave3D(newleadbeatnew,timenew,i,messages.setup.wavedet.freq,S,QRSoff,samp,rrmed,messages); %#ok<ASGLU>\n%                             janelasnew=janelas2+timenew(i)-1;\n                        else\n                            picoffnew=NaN;\n                        end\n                        picoffall=[picoffall picoffnew]; %#ok<AGROW>\n                        if isnan(picoffnew)\n                            amppicoffall=[amppicoffall NaN]; %#ok<AGROW>\n                        else\n                            amppicoffall=[amppicoffall abs(newleadbeatnew(picoffnew-timenew(i)+1))]; %#ok<AGROW>\n                        end\n                        newToff=[newToff pos.Toff]; %#ok<AGROW>\n\n                        if (amppicoffall(end)<amppicoffall(end-1))\n                            pos.Toff=NaN; % because the lead got worse\n                        end\n                        if isnan(pos.Toff); %01Jun05\n                            pos.Toff=newToff(end-1);\n                            position.contadorToff(intervalo(i))=position.contadorToff(intervalo(i))-1;\n                        else\n                            %Vg(i,:)=V2(end,:);\n                            position.direccionToffopt(:,intervalo(i))=V2(end,:);\n                            %contador=[contador; recursioncount.Toff];\n                        end\n                        if  prod(picoffall(1:end-1)-picoffall(end))==0  % ciclo infinito no teste 14\n                            picoffall(end)=NaN;\n                        end\n                    end\n                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n                    position.Tscale(intervalo(i))=scale;\n                    position.Toff(intervalo(i))=pos.Toff;\n                    position.T(intervalo(i))=pos.T;\n                    position.Ttipooff(intervalo(i))=pos.Ttipo;\n                    position.Ttipo(intervalo(i))=NaN;\n                    position.Tprima(intervalo(i))=pos.Tprima;\n                    %position.contadorToff=recursioncount.Toff;\n                    %position.Wavedet(intervalo(i))=newleadbeatnew; % derivada wavedet Maikel 30 marzo 2009\n                    %position.direccion(:,intervalo(i))=V2; % vector direcci\ufffdn Maikel 30 marzo 2009\n                \n                end\n                %\n            end\n        else\n            position.Tscale(intervalo(i))=NaN;\n            position.Toff(intervalo(i))=NaN;\n            position.T(intervalo(i))=NaN;\n            position.Ttipooff(intervalo(i))=NaN;\n            position.Ttipo(intervalo(i))=NaN;\n            position.Tprima(intervalo(i))=NaN;\n            recursioncount.Toff(intervalo(i))=NaN;\n            position.contadorToff(intervalo(i))=NaN; %Rute\n            %position.Wavedet(intervalo(i))=NaN;  % derivada wavedet Maikel 30 marzo 2009\n            %position.direccion(:,intervalo(i))=NaN; % vector direcci\ufffdn Maikel 30 marzo 2009   \n        end\n        \n        Tbeginauxiliar\n    end\nend\n% position0.A(intervalo(i))=A;\n% position0.A2(intervalo(i))=A2;\n% position0.V(intervalo(i))=V;\n% position0.V2(intervalo(i))=V2;\n", "meta": {"author": "marianux", "repo": "ecg-kit", "sha": "c8e3de47c54a9214138143676d2aa546b0540dd2", "save_path": "github-repos/MATLAB/marianux-ecg-kit", "path": "github-repos/MATLAB/marianux-ecg-kit/ecg-kit-c8e3de47c54a9214138143676d2aa546b0540dd2/common/wavedet/delineate3D.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.5467381667555714, "lm_q2_score": 0.1778108738349752, "lm_q1q2_score": 0.09721599118974054}}
{"text": "function  a = i4vec_indicator1 ( n )\n\n%*****************************************************************************80\n%\n%% I4VEC_INDICATOR1 sets an I4VEC to the indicator vector (1,2,3,...).\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license. \n%\n%  Modified:\n%\n%    27 September 2014\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Input, integer N, the number of entries in the vector.\n%\n%    Output, integer A(N), the vector.\n%\n  a = ( 1 : n );\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/r8lib/i4vec_indicator1.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.46101677931231594, "lm_q2_score": 0.20434189993684584, "lm_q1q2_score": 0.0942050445874442}}
{"text": "function plotData(x, y)\n%PLOTDATA Plots the data points x and y into a new figure \n%   PLOTDATA(x,y) plots the data points and gives the figure axes labels of\n%   population and profit.\n\n% ====================== YOUR CODE HERE ======================\n% Instructions: Plot the training data into a figure using the \n%               \"figure\" and \"plot\" commands. Set the axes labels using\n%               the \"xlabel\" and \"ylabel\" commands. Assume the \n%               population and revenue data have been passed in\n%               as the x and y arguments of this function.\n%\n% Hint: You can use the 'rx' option with plot to have the markers\n%       appear as red crosses. Furthermore, you can make the\n%       markers larger by using plot(..., 'rx', 'MarkerSize', 10);\n\nfigure; % open a new figure window\n\nplot(x, y, 'rx', 'MarkerSize', 10);\nxlabel('Population of City in 10,000s');\nylabel('Profit in $10,000s');\n\n\n\n% ============================================================\n\nend\n", "meta": {"author": "sfvsfv", "repo": "Mathematical-modeling", "sha": "cef1a3688246851f067777b3599b1b3831d3d948", "save_path": "github-repos/MATLAB/sfvsfv-Mathematical-modeling", "path": "github-repos/MATLAB/sfvsfv-Mathematical-modeling/Mathematical-modeling-cef1a3688246851f067777b3599b1b3831d3d948/matlab\u5434\u6069\u8fbe\u673a\u5668\u5b66\u4e60/machine-learning-ex1/ex1/plotData.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.399811640739795, "lm_q2_score": 0.22815650216092537, "lm_q1q2_score": 0.09121962547441216}}
{"text": "function [ a, b ] = p06_lim ( )\n\n%*****************************************************************************80\n%\n%% P06_LIM returns the integration limits for problem 6.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    04 November 2009\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real A, B, the limits of integration.\n%\n  a = -1.0;\n  b = 1.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_int/p06_lim.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.48047867804790706, "lm_q2_score": 0.1778108760134381, "lm_q1q2_score": 0.08543433464947704}}
{"text": "function [ a, b] = p02_interval ( )\n\n%*****************************************************************************80\n%\n%% P02_INTERVAL returns a starting interval for optimization for problem 2.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    26 February 2002\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real A, B, two points defining an interval in which\n%    the local minimizer should be sought.\n%\n  a = 0.0;\n  b = 1.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_min/p02_interval.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.4921881357207955, "lm_q2_score": 0.16026603433317138, "lm_q1q2_score": 0.07888104065780863}}
{"text": "function cmap = crameri(ColormapName,varargin) \n% crameri returns perceptually-uniform scientific colormaps created\n% by Fabio Crameri. \n% \n%% Syntax \n% \n%  crameri \n%  cmap = crameri('ColormapName') \n%  cmap = crameri('-ColormapName') \n%  cmap = crameri(...,NLevels)\n%  cmap = crameri(...,'pivot',PivotValue) \n%  crameri(...)\n% \n%% Description \n% \n% crameri without any inputs displays the options for colormaps. \n% \n% cmap = crameri('ColormapName') returns a 256x3 colormap.  For a visual\n% depiction of valid colormap names, type |crameri|. \n%\n% cmap = crameri('-ColormapName') a minus sign preceeding any ColormapName flips the\n% order of the colormap. \n%\n% cmap = crameri(...,NLevels) specifies a number of levels in the colormap.  Default\n% value is 256. \n%\n% cmap = crameri(...,'pivot',PivotValue) centers a diverging colormap such that white \n% corresponds to a given value and maximum extents are set using current caxis limits. \n% If no PivotValue is set, 0 is assumed. \n%\n% crameri(...) without any outputs sets the current colormap to the current axes.  \n% \n%% Examples \n% For examples, type: \n% \n%  showdemo crameri_documentation\n%\n%% Author Info \n% This function was written by Chad A. Greene of the University of Texas\n% Institute for Geophysics (UTIG), August 2018, using Fabio Crameri's \n% scientific colormaps, version 4.0. http://www.fabiocrameri.ch/colourmaps.php\n% \n%% Citing this colormap: \n% Please acknowledge the free use of these colormaps by citing\n% \n% Crameri, F. (2018). Scientific colour-maps. Zenodo. http://doi.org/10.5281/zenodo.1243862\n% \n% Crameri, F. (2018), Geodynamic diagnostics, scientific visualisation and \n% StagLab 3.0, Geosci. Model Dev., 11, 2541-2562, doi:10.5194/gmd-11-2541-2018.\n% \n% For more on choosing effective and accurate colormaps for science, be sure\n% to enjoy this fine beach reading: \n% \n% Thyng, K.M., C.A. Greene, R.D. Hetland, H.M. Zimmerle, and S.F. DiMarco. 2016. True \n% colors of oceanography: Guidelines for effective and accurate colormap selection. \n% Oceanography 29(3):9-13, http://dx.doi.org/10.5670/oceanog.2016.66.\n% \n% See also colormap and caxis.  \n\n%% Display colormap options: \n\nif nargin==0\n   figure('menubar','none','numbertitle','off','Name','crameri options:')\n   \n   if license('test','image_toolbox')\n      imshow(imread('crameri7.0.png')); \n   else\n      axes('pos',[0 0 1 1])\n      image(imread('crameri7.0.png')); \n      axis image off\n   end\n   \n   return\nend\n\n%% Error checks: \n\nassert(isnumeric(ColormapName)==0,'Input error: ColormapName must be a string.') \n\n%% Set defaults: \n\nNLevels = 256; \nautopivot = false; \nPivotValue = 0; \nInvertedColormap = false; \n\n%% Parse inputs: \n\n% Does user want to flip the colormap direction? \ndash = strncmp(ColormapName,'-',1); \nif any(dash) \n   InvertedColormap = true; \n   ColormapName(dash) = []; \nend\n\n% Standardize all colormap names to lowercase: \n%ColormapName = lower(ColormapName); \n\n% Oleron's too hard for me to remember, so I'm gonna use dem or topo. \nif ismember(ColormapName,{'dem','topo'})\n   ColormapName = 'oleron'; \nend\n\n% Does the user want to center a diverging colormap on a specific value? \n% This parsing support original 'zero' syntax and current 'pivot' syntax. \ntmp = strncmpi(varargin,'pivot',3); \nif any(tmp) \n   autopivot = true; \n   try\n      if isscalar(varargin{find(tmp)+1})\n         PivotValue = varargin{find(tmp)+1}; \n         tmp(find(tmp)+1) = 1; \n      end\n   end\n   varargin = varargin(~tmp); \nend\n\n% Has user requested a specific number of levels? \ntmp = isscalar(varargin); \nif any(tmp) \n   NLevels = varargin{tmp}; \nend\n\n%% Load RGB values and interpolate to NLevels: \n\ntry\n   S = load('CrameriColourMaps7.0.mat',ColormapName); \n   cmap = S.(ColormapName); \ncatch\n   error(['Unknown colormap name ''',ColormapName,'''. Try typing crameri with no inputs to check the options and try again.'])\nend\n\n% Interpolate if necessary: \nif NLevels~=size(cmap,1) \n   cmap = interp1(1:size(cmap,1), cmap, linspace(1,size(cmap,1),NLevels),'linear');\nend\n\n%% Invert the colormap if requested by user: \n\nif InvertedColormap\n   cmap = flipud(cmap); \nend\n\n%% Adjust values to current caxis limits? \n\nif autopivot\n   clim = caxis; \n   maxval = max(abs(clim-PivotValue)); \n   cmap = interp1(linspace(-maxval,maxval,size(cmap,1))+PivotValue, cmap, linspace(clim(1),clim(2),size(cmap,1)),'linear');\nend\n\n%% Clean up \n\nif nargout==0\n   colormap(gca,cmap) \n   clear cmap  \nend\n\n%% Code to collect Fabio's data into a single .mat file: \n% Unzip the latest folder, navigate to that filepath, and run this.\n% Update the file list as needed. \n%\n% clear all\n% f = {'acton','bam','bamO','bamako','batlow','batlowK','batlowW','berlin','bilbao','broc','brocO','buda','bukavu','cork',...\n%    'corkO','davos','devon','fes','grayC','hawaii','imola','lajolla','lapaz','lisbon',...\n%    'nuuk','oleron','oslo','roma','romaO','tofino','tokyo','turku','vanimo','vik','vikO'}; \n% \n% for k = 1:length(f)\n%    load([f{k},'/',f{k},'.mat'])\n% end\n% \n% clear f k \n% save('CrameriColourMaps7.0.mat')\n", "meta": {"author": "opencobra", "repo": "cobratoolbox", "sha": "e60274d127f65d518535fd0814d20c53dc530f73", "save_path": "github-repos/MATLAB/opencobra-cobratoolbox", "path": "github-repos/MATLAB/opencobra-cobratoolbox/cobratoolbox-e60274d127f65d518535fd0814d20c53dc530f73/external/visualization/crameri/crameri.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.47268347662043286, "lm_q2_score": 0.152032235859071, "lm_q1q2_score": 0.07186312580424332}}
{"text": "function [ a, b ] = p01_lim ( )\n\n%*****************************************************************************80\n%\n%% P01_LIM returns the integration limits for problem 1.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    04 November 2009\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real A, B, the limits of integration.\n%\n  a = 0.0;\n  b = 1.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_int/p01_lim.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.3738758227716966, "lm_q2_score": 0.18952108217423458, "lm_q1q2_score": 0.07085735053047428}}
{"text": "function sz = mysize(M)\n% MYSIZE Like the built-in size, except it returns n if M is a vector of length n, and 1 if M is a scalar.\n% sz = mysize(M)\n% \n% The behavior is best explained by examples\n% - M = rand(1,1),   mysize(M) = 1,      size(M) = [1 1]\n% - M = rand(2,1),   mysize(M) = 2,      size(M) = [2 1]\n% - M = rand(1,2),   mysize(M) = 2,      size(M) = [1 2]\n% - M = rand(2,2,1), mysize(M) = [2 2],  size(M) = [2 2]\n% - M = rand(1,2,1), mysize(M) = 2,      size(M) = [1 2]\n\nif isvectorBNT(M)\n  sz = length(M);\nelse\n  sz = size(M);\nend\n", "meta": {"author": "bayesnet", "repo": "bnt", "sha": "bebba5f437b4e1e29169f0f3669df59fb5392e62", "save_path": "github-repos/MATLAB/bayesnet-bnt", "path": "github-repos/MATLAB/bayesnet-bnt/bnt-bebba5f437b4e1e29169f0f3669df59fb5392e62/KPMtools/mysize.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.48047867804790706, "lm_q2_score": 0.14414885854780773, "lm_q1q2_score": 0.0692604529971654}}
{"text": "% line_fewer_markers - line with controlled amount of markers and correct legend behaviour\n% \n%   LINE_FEWER_MARKERS(X,Y,NUM_MARKERS) adds the line in vectors X and Y to the current axes\n%   with exactly NUM_MARKERS markers drawn.\n% \n%   LINE_FEWER_MARKERS(X,Y,NUM_MARKERS,'PropertyName',PropertyValue,...) plots the data\n%   stored in the vectors X and Y.\n%\n%   LINE_FEWER_MARKERS returns handles to LINE/MARKER objects.\n% \n%   [H1,H2,H3] = LINE_FEWER_MARKERS(X,Y,NUM_MARKERS,'PropertyName',PropertyValue,...) \n%   performs the actions as above and returns the handles of all the plotted lines/markers.\n%   H1    = handle to the main marker(1 point); it may be put in array and used with legend\n%   H2    = handle to the continuous line (as in H2=plot())\n%   H3    = handle to all other markers\n%\n%   Property/Value pairs and descriptions:\n%       \n%       Spacing    - 'x'      : ordinary uniform along x\n%                  - 'curve'  : equal lengths along curve y(x)\n%                  - 'logx'   : to be used with logarithmic x scale\n% \n%       LockOnMax  - 0        : first marker on 1st data point\n%                  - 1        : offset all markers such that one marker on first max of y(x)\n% \n%       LegendLine - 'on'     : default, reproduce linestyle also in legend\n%                  - 'off'    : shows only marker in legend\n% \n%       LineSpec: same as for LINE: LineStyle,LineWidth,Marker,MarkerSize,MarkerFaceColor...\n%\n%\n%   Example: plot 3 curves with 9,9, and 15 markers each, using different input styles\n% \n%      figure; hold on;\n%      t  = 0:0.005:pi;\n%      line_fewer_markers(t*180/pi,cos(t) ,9,  '--bs','spacing','curve');\n%      line_fewer_markers(t*180/pi,sin(t) ,9,  '-.ro','MarkerFaceColor','g', ...\n%                                                     'markersize',6,'linewidth',2);\n%      grey1 = [1 1 1]*0.5;\n%      line_fewer_markers(t*180/pi,sin(t).*cos(t) ,15, ':','marker','h','color',grey1, ...\n%                                    'markerfacecolor',grey1,'linewidth',2,'LockOnMax',1);\n%      leg = legend('cos','sin','sin*cos','location','best');\n%\n% Inspired by Ioannis Filippidis's answer: \n% http://www.mathworks.com/matlabcentral/answers/2165-too-many-markers\n% \n% rev.4, Massimo Ciacci, October 17, 2014\n% \nfunction [H1,H2,H3] = line_fewer_markers(x,y,num_Markers, varargin)\n\n%% find marker spec in varargin and remove it; extract special params: LockOnMax,Spacing\nif mod(length(varargin),2)\n    if ischar(varargin{1})\n      linspec   = varargin{1};\n      extraArgs = varargin(2:end);\n      [varargInNoMk,varargInNoMkNoLn,lm,ms,mfc,LockOnMax,Spacing,LegendLine] = parseargsLineSpec(linspec,extraArgs);\n    else\n      error('odd sized [param | val] list, missing one param ?');\n    end\nelse\n      [varargInNoMk,varargInNoMkNoLn,lm,ms,mfc,LockOnMax,Spacing,LegendLine] = parseargs(varargin{:});  \nend\n\n%% input size check\nif  isvector(x) &&  isvector(y)\n    % make x,y row vectors\n    if iscolumn(x), x = x.'; end\n    if iscolumn(y), y = y.'; end\nelse\n    error('line_fewer_markers: input arguments must be 1D vectors');\nend\n\n% How the method works: plots 3 times: \n% a) once only the line with all points with the style                                        'r--' and invisible handle, \n% b) last time the markers, using fewer points with style                                     'ro' and again invisible handle.\n% c) once with a visible handle, only the first point, using the complete style you specified (e.g. 'r--o')\n\n%% a) once only the line with all points with the style                                                                \nH2 = line(x   ,y   ,varargInNoMk{:});                               %no markers here\nhasbehavior(H2,'legend',0);                                         %prevent to appear in legends!\n\n%% b) last time the markers, using fewer points with style     \n%sort the xvalues\n[x_t,I] = sort(x);\ny_t = y(I);\n[x_t,I] = unique(x_t);\ny_t = y_t(I);\n\nif     (strcmp(Spacing,'x') || strcmp(Spacing,'X'))\n    ti = round(linspace(1,length(x_t),num_Markers));\nelseif (strcmp(Spacing,'logx') || strcmp(Spacing,'log'))\n    xi = logspace(log10(x_t(2)),log10(x_t(end-1)),num_Markers);\n    ti = floor(interp1(x_t,(1:length(x_t)),xi));\nelseif (strcmp(Spacing,'curve') || strcmp(Spacing,'Curve'))\n    scaleY     = 3/4; % 1/1 figure aspect ratio\n    yNrm       = (y-min(y))./(max(y)-min(y))*scaleY;             %NORMALIZE y scale in [0 1], height of display is prop to max(abs(y))        \n    xNrm       = (x-min(x))./(max(x)-min(x));                    %NORMALIZE x scale in [0 1]   \n    \n    if (sum(isinf(yNrm))>0) || sum(isinf(x))>0                   %spacing along curve not possible with infinites\n        ti = round(linspace(1,length(x),num_Markers)); \n    else\n        t        = 1:length(x);                                \n        s        = [0 cumsum(sqrt(diff(xNrm).^2+diff(yNrm).^2))];%measures length along the curve\n        si       = (0:num_Markers-1)*s(end)/(num_Markers-1);     %equally spaced lengths along the curve\n        si(end)  = s(end);                                       %fix last point to be within the curve                    \n        ti       = round(interp1(s,t,si));                       %find x index of markers\n    end\nelse\n    error('invalid spacing parameter');\nend\n%if LockOnMax\n    %set one ti on max if found\n%    [Mv,idx]   = max(y); idx=idx(1);\n%    [mv,idxti] = min(abs(idx-ti));\n%    deltati    = ti(idxti)-idx;\n%    ti         = max(1,min(ti-deltati,length(y)));\n%end    \nxi = x_t(ti);\nyi = y_t(ti);           \nH3 = line(xi,yi,varargInNoMkNoLn{:},'Marker',lm,'MarkerSize',ms,'MarkerFaceColor',mfc,'LineStyle','none');  %plot markers only\nhasbehavior(H3,'legend',0); %prevent to appear in legends!\n\n%% c) once with a visible handle, only the first point, using the complete style you specified                         \nif strcmp(LegendLine,'on')\n    H1 = line(xi(1),yi(1),varargInNoMk{:},'Marker',lm,'MarkerSize',ms,'MarkerFaceColor',mfc);\nelse\n    H1 = line(xi(1),yi(1),varargInNoMk{:},'linestyle','none','Marker',lm,'MarkerSize',ms,'MarkerFaceColor',mfc);\nend\n\n\n%-------------------------------------------------------------\n% PARSE FUNCTIONS\n%-------------------------------------------------------------\n% varargInNoMk = list of property pairs, marker specs removed \n% varargInNoMkNoLn = list of property pairs, marker specs and line specs removed \nfunction [varargInNoMk,varargInNoMkNoLn,lm,ms,mfc,LockOnMax,Spacing,LegendLine] = parseargs(varargin)\nlm =[]; ms =[]; mfc=[]; LockOnMax=[]; Spacing=[]; LegendLine=[];\nvarargInNoMk = {};\nvarargInNoMkNoLn = {};\narg_index = 1;\nwhile arg_index <= length(varargin)\n\targ = varargin{arg_index};\n    % extract special params and marker specs from arg list\n    if strcmp(arg,'marker') || strcmp(arg,'Marker') || strcmp(arg,'Mk')  || strcmp(arg,'mk')\n        lm              = varargin{arg_index+1};\n    elseif strcmp(arg,'MarkerSize') || strcmp(arg,'markersize') || strcmp(arg,'Mks')  || strcmp(arg,'mks')\n        ms              = varargin{arg_index+1};        \n    elseif strcmp(arg,'MarkerFaceColor') || strcmp(arg,'markerfacecolor')||strcmp(arg,'MFC')||strcmp(arg,'mfc')\n        mfc             = varargin{arg_index+1};\n    elseif strcmp(arg,'LockOnMax') || strcmp(arg,'lockonmax')\n        LockOnMax       = varargin{arg_index+1};\n    elseif strcmp(arg,'Spacing')   || strcmp(arg,'spacing') \n        Spacing         = varargin{arg_index+1};\n    elseif strcmp(arg,'LegendLine')   || strcmp(arg,'legendline') \n        LegendLine      = varargin{arg_index+1};\n    else\n        % keep other params in arg list for line command\n        varargInNoMk    = {varargInNoMk{:},  varargin{arg_index},  varargin{arg_index+1}};\n        if ~strcmp(arg,'LineStyle') && ~strcmp(arg,'linestyle') \n           % exclude line params for marker only plot\n           varargInNoMkNoLn = {varargInNoMkNoLn{:},  varargin{arg_index},  varargin{arg_index+1}};\n        end\n    end\n    arg_index = arg_index + 2;\t\nend\n%EXTRA DEFAULTS ARE SET HERE\nif isempty(lm),         lm          = 'o'   ; end\nif isempty(ms),         ms          = 10    ; end\nif isempty(mfc),        mfc         = 'none'; end\nif isempty(LockOnMax),  LockOnMax   = 1     ; end\nif isempty(Spacing),    Spacing     = 'x'   ; end %%'x' -> marker delta-x constant; 'curve' : spacing constant along the curve length\nif isempty(LegendLine), LegendLine  = 'on'  ; end \n\n%-------------------------------------------------------------\n% Parse LineSpec string and other arguments\n% varargInNoMk     = list of property pairs, marker specs removed \n% varargInNoMkNoLn = list of property pairs, marker specs and line specs removed \nfunction [varargInNoMk,varargInNoMkNoLn,lm,ms,mfc,LockOnMax,Spacing,LegendLine] = parseargsLineSpec(linspec, extraArgs)\n%          b     blue          .     point              -     solid\n%          g     green         o     circle             :     dotted\n%          r     red           x     x-mark             -.    dashdot \n%          c     cyan          +     plus               --    dashed   \n%          m     magenta       *     star             (none)  no line\n%          y     yellow        s     square\n%          k     black         d     diamond\n%          w     white         v     triangle (down)\n%                              ^     triangle (up)\n%                              <     triangle (left)\n%                              >     triangle (right)\n%                              p     pentagram\n%                              h     hexagram\nvarargInNoMk     = {};\nvarargInNoMkNoLn = {};\n\nfoundLine           = false;\nstringSearch        = {'-.','--','-',':'};\nfor ii=1:4\n    if strfind(linspec, stringSearch{ii})\n        foundLine   = true;\n        ls          = stringSearch{ii};\n        linspec     = setdiff(linspec,ls);\n        break\n    end\nend\nif foundLine\n    varargInNoMk    = {varargInNoMk{:},'lineStyle',ls};\nelse\n    varargInNoMk    = {varargInNoMk{:},'lineStyle','-'};    \nend\n\nif ~isempty(linspec)\n    foundCol            = false;\n    stringSearch        = {'b','g','r','c','m','y','k','w'};\n    for ii=1:8\n        if strfind(linspec, stringSearch{ii})\n            foundCol    = true;\n            colspec     = stringSearch{ii};\n            linspec     = setdiff(linspec,colspec);\n            break\n        end\n    end\n    if foundCol\n        varargInNoMk    = {varargInNoMk{:},'color',colspec};\n        varargInNoMkNoLn    = {varargInNoMkNoLn{:},'color',colspec};\n    end    \nend\n\nif ~isempty(linspec)\n    foundMk             = false;\n    stringSearch        = {'.','o','x','+','*','s','d','v','^','<','>','p','h'};\n    for ii=1:13\n        if strfind(linspec, stringSearch{ii})\n            foundMk     = true;\n            mkspec      = stringSearch{ii};\n            break\n        end\n    end\n    if foundMk, lm = mkspec; else lm = 'none'; end\nelse\n    lm = 'none';\nend\n\n\n[extraArgs1,unused,lm2,ms,mfc,LockOnMax,Spacing,LegendLine] = parseargs(extraArgs{:});\nif strcmp(lm,'none') && ~strcmp(lm2,'none') %if other marker specified in Property Pairs take that one\n    lm = lm2;\nend\nvarargInNoMk       = {varargInNoMk{:},extraArgs1{:}};\nvarargInNoMkNoLn   = {varargInNoMkNoLn{:},extraArgs1{:}};\n\n", "meta": {"author": "konstantinberlin", "repo": "malware-windows-audit-log-detection", "sha": "adfd205db942122d47c20624367ee97ab18be781", "save_path": "github-repos/MATLAB/konstantinberlin-malware-windows-audit-log-detection", "path": "github-repos/MATLAB/konstantinberlin-malware-windows-audit-log-detection/malware-windows-audit-log-detection-adfd205db942122d47c20624367ee97ab18be781/src/main/matlab/line_fewer_markers.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.4882833952958347, "lm_q2_score": 0.1403362476923775, "lm_q1q2_score": 0.06852385950631135}}
{"text": "function i4vec_transpose_print_test (  )\n\n%*****************************************************************************80\n%\n%% I4VEC_TRANSPOSE_PRINT_TEST tests I4VEC_TRANSPOSE_PRINT.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    27 September 2014\n%\n%  Author:\n%\n%    John Burkardt\n%\n  n = 12;\n\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, 'I4VEC_TRANSPOSE_PRINT_TEST\\n' );\n  fprintf ( 1, '  I4VEC_TRANSPOSE_PRINT prints an integer vector\\n' );\n  fprintf ( 1, '  with 5 entries to a row, and a title.\\n' );\n\n  a = i4vec_indicator1 ( n );\n\n  i4vec_print ( n, a, '  Output from I4VEC_PRINT:' );\n\n  i4vec_transpose_print ( n, a, '  My array:  ' );\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/i4lib/i4vec_transpose_print_test.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.4378234844434674, "lm_q2_score": 0.1561049013715009, "lm_q1q2_score": 0.06834639185717434}}
{"text": "function chrpak_test022 ( )\n\n%*****************************************************************************80\n%\n%% TEST022 tests I4_TO_HEX_DIGIT and HEX_DIGIT_TO_I4.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    31 August 2009.\n%\n%  Author:\n%\n%    John Burkardt\n%\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, 'TEST022\\n' );\n  fprintf ( 1, '  I4_TO_HEX_DIGIT: I4 -> hexadecimal digit\\n' );\n  fprintf ( 1, '  HEX_DIGIT_TO_I4: hexadecimal digit -> I4.\\n' );\n  fprintf ( 1, '\\n' );\n \n  for i = -2 : 11\n    ch = i4_to_hex_digit ( i );\n    i2 = hex_digit_to_i4 ( ch );\n    fprintf ( 1, '  %8d  \"%c\"  %8d\\n', i, ch, i2 );\n  end\n \n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/chrpak/chrpak_test022.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.4882833952958347, "lm_q2_score": 0.136608388268679, "lm_q1q2_score": 0.06670360764972225}}
{"text": "function range = p02_range ( )\n\n%*****************************************************************************80\n%\n%% P02_RANGE returns an interval bounding the root for problem 2.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    06 May 2011\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real RANGE(2), the minimum and maximum values of\n%    an interval containing the root.\n%\n  range(1) = -10.0;\n  range(2) = 100.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_zero/p02_range.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.43782349911420193, "lm_q2_score": 0.15002881864182907, "lm_q1q2_score": 0.06568614234573561}}
{"text": "function test_num = c8mat_exp_test_num ( )\n\n%*****************************************************************************80\n%\n%% C8MAT_EXP_TEST_NUM returns the number of matrix exponential tests.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    03 March 2013\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, integer TEST_NUM, the number of tests.\n%\n  test_num = 3;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_matrix_exponential/c8mat_exp_test_num.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.4960938294709194, "lm_q2_score": 0.13117322546005347, "lm_q1q2_score": 0.06507422774253023}}
{"text": "function [ a, b ] = p53_lim ( )\n\n%*****************************************************************************80\n%\n%% P53_LIM returns the integration limits for problem 53.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    04 November 2009\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real A, B, the limits of integration.\n%\n  a = 0.0;\n  b = 1.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_int/p53_lim.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.39981162643692797, "lm_q2_score": 0.16238003463996278, "lm_q1q2_score": 0.06492142575028823}}
{"text": "function [ a, b ] = p19_lim ( )\n\n%*****************************************************************************80\n%\n%% P19_LIM returns the integration limits for problem 19.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    04 November 2009\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real A, B, the limits of integration.\n%\n  a = 0.0;\n  b = 1.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_int/p19_lim.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.3960681662740417, "lm_q2_score": 0.162380040720207, "lm_q1q2_score": 0.06431356496755661}}
{"text": "function OUT = NaN2Num(DATA)\n% =======================================================================\n% Substitute NaN values with 123456789\n% =======================================================================\n% OUT = Num2NaN(DATA)\n% -----------------------------------------------------------------------\n% INPUT\n%\t- DATA: a (m x n) matrix with NaNs \n% -----------------------------------------------------------------------\n% OUTPUT\n%\t- OUT: a (m x n) matrix with 123456789 instead of NaNs\n% -----------------------------------------------------------------------\n% EXAMPLE\n%   x = [NaN 2; NaN 4; 5 6; 7 8; 9 10];\n%   OUT = NaN2Num(x)\n% =======================================================================\n% VAR Toolbox 3.0\n% Ambrogio Cesa-Bianchi\n% ambrogiocesabianchi@gmail.com\n% March 2012. Updated November 2020\n% -----------------------------------------------------------------------\n\nOUT=DATA;\nfor i=1:size(DATA,1)\n    for j=1:size(DATA,2)\n        if isnan(DATA(i,j)) == 1\n            OUT(i,j) = 123456789;\n        end\n    end\nend\n\n", "meta": {"author": "ambropo", "repo": "VAR-Toolbox", "sha": "9fe5d763da307cdded2827851325766b3a7c60e1", "save_path": "github-repos/MATLAB/ambropo-VAR-Toolbox", "path": "github-repos/MATLAB/ambropo-VAR-Toolbox/VAR-Toolbox-9fe5d763da307cdded2827851325766b3a7c60e1/v3dot0/Utils/NaN2Num.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.4493926344647597, "lm_q2_score": 0.14223189682786755, "lm_q1q2_score": 0.0639179668203953}}
{"text": "function p05_story ( )\n\n%*****************************************************************************80\n%\n%% P05_STORY prints the \"story\" for problem p05.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    01 August 2011\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Reference:\n%\n%    Larry Irvine, Samuel Marin, Philip Smith,\n%    Constrained Interpolation and Smoothing,\n%    Constructive Approximation,\n%    Volume 2, Number 1, December 1986, pages 129-151.\n%\n%  Parameters:\n%\n%    None\n%\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, '  This example is due to Larry Irvine, Samuel Marin and Philip Smith.\\n' );\n  fprintf ( 1, '  This data can cause problems for interpolation methods.\\n' );\n  fprintf ( 1, '  There are sudden changes in direction, and at the same time,\\n' );\n  fprintf ( 1, '  sparsely-placed data.  This can cause an interpolant to overshoot\\n' );\n  fprintf ( 1, '  the data in a way that seems implausible.\\n' );\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_interp/p05_story.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.4804786631694601, "lm_q2_score": 0.1329642316084462, "lm_q1q2_score": 0.0638864762525807}}
{"text": "function [ a, b ] = p16_lim ( )\n\n%*****************************************************************************80\n%\n%% P16_LIM returns the integration limits for problem 16.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    04 November 2009\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real A, B, the limits of integration.\n%\n  a = 0.0;\n  b = 1.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_int/p16_lim.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.3849121444839335, "lm_q2_score": 0.16451646494473968, "lm_q1q2_score": 0.06332438532479562}}
{"text": "function [ a, b ] = p45_lim ( )\n\n%*****************************************************************************80\n%\n%% P45_LIM returns the integration limits for problem 45.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    04 November 2009\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real A, B, the limits of integration.\n%\n  a = 0.0;\n  b = 1.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_int/p45_lim.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.3812195521959384, "lm_q2_score": 0.1623800386934589, "lm_q1q2_score": 0.06190244563627955}}
{"text": "function [ a, b ] = p11_lim ( )\n\n%*****************************************************************************80\n%\n%% P11_LIM returns the integration limits for problem 11.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    04 November 2009\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real A, B, the limits of integration.\n%\n  a = 0.0;\n  b = 1.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_int/p11_lim.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.38121956625614994, "lm_q2_score": 0.16238003058646674, "lm_q1q2_score": 0.06190244482883321}}
{"text": "function p04_story ( )\n\n%*****************************************************************************80\n%\n%% P04_STORY prints the \"story\" for problem p04.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    01 August 2011\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Reference:\n%\n%    Larry Irvine, Samuel Marin, Philip Smith,\n%    Constrained Interpolation and Smoothing,\n%    Constructive Approximation,\n%    Volume 2, Number 1, December 1986, pages 129-151.\n%\n%  Parameters:\n%\n%    None\n%\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, '  This example is due to Larry Irvine, Samuel Marin and Philip Smith.\\n' );\n  fprintf ( 1, '  This data can cause problems for interpolation methods.\\n' );\n  fprintf ( 1, '  There are sudden changes in direction, and at the same time,\\n' );\n  fprintf ( 1, '  sparsely-placed data.  This can cause an interpolant to overshoot\\n' );\n  fprintf ( 1, '  the data in a way that seems implausible.\\n' );\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_interp/p04_story.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.49609382947091957, "lm_q2_score": 0.12421300186801369, "lm_q1q2_score": 0.0616213037667814}}
{"text": "function p04_story ( )\n\n%*****************************************************************************80\n%\n%% P04_STORY prints the \"story\" for problem 4.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    12 August 2011\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    None\n%\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, '  Theoretically, the data is a step, 0 to the left of 5, and 1\\n' );\n  fprintf ( 1, '  to the right.  To keep things simple, the data is defined\\n' );\n  fprintf ( 1, '  to be 0 up to 5 - RADIUS, 1/2 at 5, 1 at 5 + RADIUS and beyond,\\n' );\n  fprintf ( 1, '  with RADIUS set to a \"small\" value, currently 0.01.\\n' );\n  fprintf ( 1, '  Some interpolation methods will violently overreact to this jump.\\n' );\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_approx/p04_story.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.41869689484852374, "lm_q2_score": 0.1460872526248659, "lm_q1q2_score": 0.06116627905098321}}
{"text": "\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pr01.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n% function summe=pr01(name,x)\n% prints a (0,1) profile of x and returns the number of nonzeros\n%\nfunction summe=pr01(name,x)\n\n% check for row or column vector\n[m,n]=size(x);row=(m==1);col=(n==1);n=max(m,n); \nif ~(row|col), error('x must be a vector'); end;\n\ntext=[name,': '];summe=0;\nfor k=1:n, \n  if x(k), \n    text=[text,'1'];\n    summe=summe+1;\n  else \n    text=[text,'0']; \n  end;\nend;\ndisp([text,'   ',num2str(summe),' nonzeros']);\n", "meta": {"author": "lacerbi", "repo": "optimviz", "sha": "2cc41c19ffeaaa9a23239f53d80691cf3599357d", "save_path": "github-repos/MATLAB/lacerbi-optimviz", "path": "github-repos/MATLAB/lacerbi-optimviz/optimviz-2cc41c19ffeaaa9a23239f53d80691cf3599357d/utils/mcs/minq5/pr01.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.42250463481418826, "lm_q2_score": 0.14414884751767365, "lm_q1q2_score": 0.06090355617934081}}
{"text": "function [ a, b ] = p40_lim ( )\n\n%*****************************************************************************80\n%\n%% P40_LIM returns the integration limits for problem 40.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    04 November 2009\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real A, B, the limits of integration.\n%\n  a = 0.0;\n  b = 1.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_int/p40_lim.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.3849121303722487, "lm_q2_score": 0.1581743587009343, "lm_q1q2_score": 0.06088322937784085}}
{"text": "% PLOTPDFTEX prints a PDF figure for inclusion in LaTeX documents, with\n%    LaTeX fonts. It creates a complete pdf-file with annotation of the \n%    figure (titles, labels and texts) and graphics (lines,arrows,markers,\n%    ...). This function uses the LAPRINT function and makes simply a\n%    concatenation of the text part and the graphical part in a single PDF\n%    file. It requires:\n%\n%                  MATLAB        |      OTHER\n%               -----------------|----------------------------\n%                 laprint.m      |      latex\n%                                |      dvips\n%                                |      ps2epsi or eps2eps\n%                                |      epstopdf\n%                                |      GhostScript\n%\n%    The diference between ps2epsi and eps2eps is that the first is a \n%    standard EPS converter, but creates very large file size. The commande\n%    eps2eps can be replace by ps2epsi at line 191\n%    \n%    USAGE:\n%    ------------------------\n%\n%    PLOTPDFTEX creates the PDF file of the current graphical figure (CGF) \n%    named LaTeXfile.pdf\n% \n%    PLOTPDFTEX(H) creates the PDF file from the graphical figure with \n%    handle H, named LaTeXfile.pdf\n%    \n%    PLOTPDFTEX(H,FILENAME) creates the PDF file from the graphical figure \n%    with handle H, named FILENAME.PDF (FILENAME is a character array of\n%    the filename, with or without the extension .PDF)\n%    \n%    PLOTPDFTEX(H,FILENAME,[FONTSCALING LINESCALING]) scales the font and\n%    line sizes relative to the figure size (values greater than 1 scale\n%    up, less than 1 scale down).  If nan, the default of 1 is used.\n%\n%    PLOTPDFTEX(H,FILENAME,[FONTSCALING LINESCALING],PACKAGES) to adding\n%    packages such as fonts, mathfont,...\n%    ex: PACKAGES = 'amssymb, times'\n%\n% See also LAPRINT:\n%          http://www.uni-kassel.de/fb16/rat/matlab/laprint/laprintdoc.ps \n% \n%_______________________________\n% Adjusted from PLOTEPSTEX by\n% J.C. Olivier                                    09/2007\n% http://www.jc-olivier.2007.fr\n%\n%_______________________________\n%\n% Emmett Lalish                                   06/2008\n\nfunction plotpdftex(h,FileName,FontLineSize,Packages)\n\n\nif nargin >= 3\n    fontsize=FontLineSize(1);\n    linesize=FontLineSize(2);\n    \n    id=find(isnan(FontLineSize));\n    if length(find(id==1))==1\n        fontsize=1;\n    end\n\n    if length(find(id==2))==1\n        linesize=1;\n    end\nend\n    \n\nif nargin < 3\n   fontsize=1; linesize=1; \nend\n\nif nargin < 2\n    FileName='LaTeXfile';\nend\n\nif nargin < 1\n    h=gcf;\nend\n\nTempName = strcat('TEMP',num2str(round(rand*10000))); %Generate random file name\n\n\nDTI = get(0,'defaulttextinterpreter');   %Backup of the text interpreter\nset(0,'defaulttextinterpreter','none');  %Delete the TeX interpreter\n\n\nid=findstr(FileName,'.');\nif ~isempty(id)\n    FileName(id:end)=[];\nend\n\nif ~exist('laprint.m')\n    disp('Laprint M-file does not exist or is not in the MATLAB''s search path.');\n    disp('This file can be downloaded at: http://www.mathworks.com/matlabcentral/fileexchange');\n    disp('                                                         Try again...');\n    return;\nend\n\nlaprint(h,TempName,'width',12/fontsize,'factor',linesize/fontsize,'scalefonts','off','asonscreen','on'); % Generate the EPS/LaTeX file\n\ndisp(sprintf('\\n-------------------------------------------------------'));\ndisp(sprintf('PlotEpsTeX                                      02/2008'));\ndisp(sprintf('-------------------------------------------------------'));\ndisp(sprintf('Exporting figure in EPS format, including LaTeX strings'));\ndisp(sprintf('This function is based on laprint.m:'));\ndisp(sprintf('http://www.uni-kassel.de/fb16/rat/matlab/laprint/laprintdoc.ps\\n'));\n%-------------------------------------------------------\n% Temporary LaTeX file\n%-------------------------------------------------------\nfid = fopen(strcat(TempName,'2.tex'),'w');\n\nfprintf(fid,'\\\\documentclass[11pt, oneside]{article}\\n');\nfprintf(fid,'\\\\usepackage{graphicx}\\n');\nfprintf(fid,'\\\\usepackage{amsmath}\\n');\nfprintf(fid,'\\\\usepackage[T1]{fontenc}\\n');\nfprintf(fid,'\\\\usepackage[latin1]{inputenc}\\n');\nfprintf(fid,'\\\\usepackage{ae}\\n');\nfprintf(fid,'\\\\usepackage{psfrag}\\n');\nfprintf(fid,'\\\\usepackage{color}\\n');\n\nif nargin==4\n    fprintf(fid,'\\\\usepackage{%s}\\n',Packages); % Suplementary packages\nend\nfprintf(fid,'\\\\pagestyle{empty}\\n');\nfprintf(fid,' \\n');\nfprintf(fid,'\\\\begin{document}\\n');\nfprintf(fid,'    \\\\begin{figure}\\n');\nfprintf(fid,'        \\\\centering\\n');\nfprintf(fid,'        \\\\input{%s}\\n',TempName);\nfprintf(fid,'    \\\\end{figure}\\n');\nfprintf(fid,' \\n');\nfprintf(fid,'\\\\end{document}\\n');\nfclose(fid);\n\n%-------------------------------------------------------\n% LaTeX Command\n%-------------------------------------------------------\nStr=sprintf('latex --src -interaction=nonstopmode %s2.tex',TempName);\ndisp(sprintf('\\n[LaTeX Command] %s',Str));\n[hdos,wdos]=system(Str);\n\nif hdos ~=0\n    if isunix\n        dos(sprintf('rm %s*',TempName));\n    else\n        dos(sprintf('del %s*',TempName));\n    end\n    error('Error %d -- LATEX:\\n%s',hdos ,wdos);\n    return;\nend\n\n\n%-------------------------------------------------------\n% DviPs Command\n%-------------------------------------------------------\nStr=sprintf('dvips %s2.dvi -o %s2.ps',TempName,TempName); \ndisp(sprintf('[DVIPS Command] %s',Str));\n[hdos,wdos]=system(Str);\nif hdos ~=0\n    if isunix\n        dos(sprintf('rm %s*',TempName));\n    else\n        dos(sprintf('del %s*',TempName));\n    end\n    error('Error %d -- DVIPS:\\n%s', hdos , wdos);\n    return;\nend\n\n%-------------------------------------------------------\n% eps2eps Command (can be changed with PS2EPSI)\n%-------------------------------------------------------\nStr = sprintf('eps2eps -dNOCACHE %s2.ps %s.eps',TempName,FileName);\ndisp(sprintf('[EPS2EPS Command] %s',Str));\n[hdos,wdos]=system(Str);\nif hdos ~=0\n    if isunix\n        dos(sprintf('rm %s*',TempName));\n    else\n        dos(sprintf('del %s*',TempName));\n    end\n    error('Error %d -- PS2EPSI:\\n%s',hdos ,wdos);\n    return;\nend\n\n%-------------------------------------------------------\n% epstopdf Command\n%-------------------------------------------------------\nStr = sprintf('epstopdf %s.eps',FileName);\ndisp(sprintf('[EPSTOPDF Command] %s',Str));\n[hdos,wdos]=system(Str);\nif hdos ~=0\n    if isunix\n        dos(sprintf('rm %s*',TempName));\n        dos(sprintf('rm %s.eps',FileName));\n    else\n        dos(sprintf('del %s*',TempName));\n        dos(sprintf('del %s.eps',FileName));\n    end\n    error('Error %d -- EPSTOPDF:\\n%s',hdos ,wdos);\n    return;\nend\n\ndisp(sprintf('... OK!\\nPDF file [%s.pdf] has been created in the current directory\\n',FileName));\n%-------------------------------------------------------\n% Delete all the temporary files\n%-------------------------------------------------------\nif isunix\n    dos(sprintf('rm %s*',TempName));\n    dos(sprintf('rm %s.eps',FileName));\nelse\n    dos(sprintf('del %s*',TempName));\n    dos(sprintf('del %s.eps',FileName));\nend\n\nset(0,'defaulttextinterpreter',DTI);\n\nreturn;", "meta": {"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/20847-plotpdftex/plotpdftex.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.4882833952958347, "lm_q2_score": 0.12421301159407334, "lm_q1q2_score": 0.06065115104107501}}
{"text": "function c8mat_indicator_test ( )\n\n%*****************************************************************************80\n%\n%% C8MAT_INDICATOR_TEST tests C8MAT_INDICATOR.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    14 February 2015\n%\n%  Author:\n%\n%    John Burkardt\n%\n  m = 5;\n  n = 3;\n\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, 'C8MAT_INDICATOR_TEST\\n' );\n  fprintf ( 1, '  C8MAT_INDICATOR returns the complex indicator matrix.\\n' );\n\n  a = c8mat_indicator ( m, n );\n\n  c8mat_print ( m, n, a, '  The indicator matrix:' );\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/c8lib/c8mat_indicator_test.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.47657965106367595, "lm_q2_score": 0.12592276975547595, "lm_q1q2_score": 0.06001222967103634}}
{"text": "function nvar = p01_nvar ( option )\n\n%*****************************************************************************80\n%\n%% P01_NVAR sets the number of variables for problem 1.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    02 September 2008\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Input, integer OPTION, the option chosen for this problem.\n%    For some problems, several options are available.  At least,\n%    OPTION = 1 is always legal.\n%\n%    Output, integer NVAR, the number of variables.\n%\n  nvar = 3;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_con/p01_nvar.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.3998116264369279, "lm_q2_score": 0.1480471923932738, "lm_q1q2_score": 0.05919098878017558}}
{"text": "function i4_is_odd_test ( )\n\n%*****************************************************************************80\n%\n%% I4_IS_ODD_TEST tests I4_IS_ODD.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    15 December 2014\n%\n%  Author:\n%\n%    John Burkardt\n%\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, 'I4_IS_ODD_TEST\\n' );\n  fprintf ( 1, '  I4_IS_ODD reports whether an I4 is odd.\\n' );\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, '  I     I4_IS_ODD(I)\\n' );\n  fprintf ( 1, '\\n' );\n\n  for i = -2 : 25\n    fprintf ( 1, '  %6d  %1d\\n', i, i4_is_odd ( i ) );\n  end\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/i4lib/i4_is_odd_test.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.3886180267058489, "lm_q2_score": 0.15203224930631218, "lm_q1q2_score": 0.0590824727210707}}
{"text": "%% Copyright (C) 2014-2019, 2021-2022 Colin B. Macdonald\n%%\n%% This file is part of OctSymPy.\n%%\n%% OctSymPy is free software; you can redistribute it and/or modify\n%% it under the terms of the GNU General Public License as published\n%% by the Free Software Foundation; either version 3 of the License,\n%% or (at your option) any later version.\n%%\n%% This software is distributed in the hope that it will be useful,\n%% but WITHOUT ANY WARRANTY; without even the implied warranty\n%% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See\n%% the GNU General Public License for more details.\n%%\n%% You should have received a copy of the GNU General Public\n%% License along with this software; see the file COPYING.\n%% If not, see <http://www.gnu.org/licenses/>.\n\n%% -*- texinfo -*-\n%% @documentencoding UTF-8\n%% @defun  vpa (@var{x})\n%% @defunx vpa (@var{x}, @var{n})\n%% Create a variable-precision floating point number.\n%%\n%% @var{x} can be a string, a sym or a double.  Example:\n%% @example\n%% @group\n%% x = vpa('1/3', 32)\n%%   @result{} x = (sym) 0.33333333333333333333333333333333\n%% a = sym(1)/3;\n%% x = vpa(a, 32)\n%%   @result{} x = (sym) 0.33333333333333333333333333333333\n%% @end group\n%% @end example\n%%\n%% If @var{n} is omitted it defaults to the current value of\n%% @code{digits()}.\n%%\n%% Be careful when creating a high-precision float from a\n%% double as you will generally only get 15 digits:\n%% @example\n%% @group\n%% vpa(1/3)\n%%   @result{} (sym) 0.3333333333333333148296162...\n%% vpa(sqrt(2));\n%% ans^2\n%%   @result{} (sym) 2.0000000000000002734323463...\n%% @end group\n%% @end example\n%%\n%% For the same reason, passing numbers with decimal points\n%% may produce undesirable results:\n%% @example\n%% @group\n%% vpa(0.1)\n%%   @result{} (sym) 0.1000000000000000055511151...\n%% @end group\n%% @end example\n%%\n%% Instead, enclose the decimal number in a string:\n%% @example\n%% @group\n%% vpa('0.1')\n%%   @result{} (sym) 0.10000000000000000000000000000000\n%% @end group\n%% @end example\n%%\n%% Very simple expressions can also be enclosed in quotes:\n%% @example\n%% @group\n%% vpa('sqrt(2)')\n%%   @result{} (sym) 1.4142135623730950488016887242097\n%% @end group\n%% @end example\n%%\n%% But be careful as this can lead to unexpected behaviour, such as\n%% low-precision results if the string contains decimal points:\n%% @example\n%% @group\n%% vpa('cos(0.1)')\n%%   @print{} warning: string expression involving decimals is\n%%   @print{}          dangerous, see \"help vpa\"...\n%%   @result{} ans = (sym) 0.99500416527802...\n%% @end group\n%% @end example\n%%\n%% Instead, it is preferrable to use @code{sym} or @code{vpa} on the\n%% inner-most parts of your expression:\n%% @example\n%% @group\n%% cos(vpa('0.1'))\n%%   @result{} (sym) 0.99500416527802576609556198780387\n%% vpa(cos(sym(1)/10))\n%%   @result{} (sym) 0.99500416527802576609556198780387\n%% @end group\n%% @end example\n%%\n%% @seealso{sym, vpasolve, digits}\n%% @end defun\n\nfunction r = vpa(x, n)\n\n  if (nargin == 1)\n    n = digits();\n  elseif (nargin ~= 2)\n    print_usage ();\n  end\n\n\n  if (isa(x, 'sym'))\n    cmd = {\n        'x, n = _ins'\n        'return sympy.N(x, n),' };\n    r = pycall_sympy__ (cmd, x, n);\n  elseif (ischar (x))\n    x = strtrim (x);\n    isfpnum = ...\n      ~isempty (regexp (x, '^[-+]*?[\\d_]*\\.[\\d_]*(e[+-]?[\\d_]+)?[ij]?$'));\n    if (~isfpnum && ~isempty (strfind (x, '.')))\n      warning ('OctSymPy:vpa:precisionloss', ...\n               'string expression involving decimals is dangerous, see \"help vpa\"')\n    end\n    if (isfpnum && any (strcmp (x(end), {'i', 'j'})))\n      r = sym (1i)*vpa (x(1:end-1), n);\n      return\n    end\n    if (any (strcmp (x, {'inf', 'Inf', '+inf', '+Inf'})))\n      x = 'S.Infinity';\n    elseif (strcmp (x, '-inf') || strcmp (x, '-Inf'))\n      x = '-S.Infinity';\n    elseif (strcmp (x, 'I'))\n      x = 'Symbol(\"I\")';\n    elseif (any (strcmp (x, {'1i', '1j'})))\n      x = 'S.ImaginaryUnit';\n    end\n    % Want Float if its '2.3' but N if its 'sqrt(2)'\n    cmd = {\n        'x, n = _ins'\n        'try:'\n        '    return sympy.Float(x, n),'\n        'except ValueError:'\n        '    return sympy.N(x, n),' };\n    r = pycall_sympy__ (cmd, x, n);\n  elseif (isfloat (x) && ~isreal (x))\n    r = vpa (real (x), n) + sym (1i)*vpa (imag (x), n);\n  elseif (isfloat(x) && isscalar(x) == 1)\n    if (isnan (x))\n      x = 'S.NaN';\n    elseif (isinf (x) && x < 0)\n      x = '-S.Infinity';\n    elseif (isinf (x))\n      x = 'S.Infinity';\n    elseif (isequal (x, pi))\n      x = 'S.Pi';\n    elseif (isequal (x, -pi))\n      x = '-S.Pi';\n    elseif (isequal (x, exp (1)))\n      x = exp (sym (1));\n    elseif (isequal (x, -exp (1)))\n      x = -exp (sym (1));\n    end\n    cmd = {\n      'x, n = _ins'\n      'return sympy.N(x, n)' };\n    r = pycall_sympy__ (cmd, x, n);\n  elseif (isinteger(x) && isscalar(x) == 1)\n    cmd = {\n        'x, n = _ins'\n        'return sympy.N(x, n),' };\n    r = pycall_sympy__ (cmd, x, n);\n  elseif (~isscalar(x))\n    cmd = { sprintf('return sympy.ZeroMatrix(%d, %d).as_mutable(),', size(x)) };\n    r = pycall_sympy__ (cmd);\n    for i=1:numel(x)\n      r(i) = vpa(x(i), n);\n    end\n  else\n    x\n    class(x)\n    error('conversion to vpa with those arguments not (yet) supported');\n  end\n\nend\n\n\n%!test\n%! a = vpa(0, 4);\n%! b = double(a);\n%! assert(b == 0)\n\n%!test\n%! a = vpa(pi, 4);\n%! b = sin(a);\n%! assert(abs(double(b)) < 1e-4)\n\n%!test\n%! % vpa from double is ok, doesn't warn (c.f., sym(2.3))\n%! a = vpa(2.3);\n%! assert(true)\n\n%!test\n%! % vpa from double not more than 16 digits\n%! a = vpa(sqrt(pi), 32);\n%! b = sin(a^2);\n%! assert(abs(double(b)) > 1e-20)\n%! assert(abs(double(b)) < 1e-15)\n\n%!test\n%! a = vpa(sym(pi), 32);\n%! b = sin(a);\n%! assert(abs(double(b)) < 1e-30)\n\n%!test\n%! a = vpa(sym(pi), 256);\n%! b = sin(a);\n%! assert(abs(double(b)) < 1e-256)\n\n%!test\n%! % pi str\n%! a = vpa('pi', 32);\n%! b = sin(a);\n%! assert(abs(double(b)) < 1e-32)\n\n%!test\n%! % pi str\n%! a = vpa('pi', 32);\n%! b = vpa(sym('pi'), 32);\n%! assert (double (a - b) == 0)\n\n%!test\n%! spi = sym(pi);\n%! a = vpa(spi, 10);\n%! b = double(a);\n%! assert(~isAlways(spi == a))\n\n%!test\n%! % matrix of sym\n%! a = [sym(pi) 0; sym(1)/2 1];\n%! b = [pi 0; 0.5 1];\n%! c = vpa(a, 6);\n%! assert(max(max(abs(double(c)-b))) < 1e-6)\n\n%!test\n%! % matrix of double\n%! b = [pi 0; 0.5 1];\n%! c = vpa(b, 6);\n%! assert(max(max(abs(double(c)-b))) < 1e-6)\n\n%!test\n%! % integer type\n%! a = vpa(int32(6), 64);\n%! b = vpa(6, 64);\n%! assert (isequal (a, b))\n\n%!test\n%! % matrix of int\n%! b = int32([pi 0; 6.25 1]);\n%! c = vpa(b, 6);\n%! assert (isequal (double(c), [3 0; 6 1]))\n\n%!test\n%! % can pass pi directly to vpa\n%! a = vpa(sym(pi), 128);\n%! b = vpa(pi, 128);\n%! assert (isequal (a, b))\n\n%!test\n%! % if sym does sth special for e so should vpa\n%! a = vpa(sym(exp(1)), 64);\n%! b = vpa(exp(1), 64);\n%! assert (isequal (a, b))\n\n%!test\n%! % can pass pi directly to vpa, even in array\n%! a = vpa(sym([2 pi]), 128);\n%! b = vpa([2 pi], 128);\n%! assert (isequal (a, b))\n\n%!test\n%! % can pass i directly to vpa\n%! a = vpa(sym(i));\n%! b = vpa(i);\n\n%!test\n%! % 'i' and 'I' just make vars\n%! a = vpa(sym(1i));\n%! b = vpa('i');\n%! c = vpa('I');\n%! assert (~isequal (a, b))\n%! assert (~isequal (a, c))\n\n%!test\n%! % '1i' and '1j' strings\n%! a = vpa(sym(1i));\n%! b = vpa('1i');\n%! c = vpa('1j');\n%! assert (isequal (a, b))\n%! assert (isequal (a, c))\n\n%!test\n%! % Issue #868, precision loss on '0.33j'\n%! a = vpa('0.33j', 40);\n%! b = vpa('0.33i', 40);\n%! assert (double (abs (imag (a)*100/33) - 1) < 1e-39)\n%! assert (isequal (a, b))\n\n%!test\n%! % inf/-inf do not become symbol('inf')\n%! S = {'oo', '-oo', 'inf', 'Inf', '-inf', '+inf'};\n%! for j = 1:length(S)\n%!   a = vpa(S{j});\n%!   b = vpa(sym(S{j}));\n%!   assert (isequal (a, b))\n%! end\n\n%!test\n%! a = vpa('2.3', 20);\n%! s = strtrim(disp(a, 'flat'));\n%! assert (strcmp (s, '2.3000000000000000000'))\n\n%!test\n%! % these should *not* be the same\n%! a = vpa(2.3, 40);\n%! b = vpa('2.3', 40);\n%! sa = sympy (a);\n%! sb = sympy (b);\n%! assert (~isequal (a, b))\n%! assert (abs(double(a - b)) > 1e-20)\n%! assert (abs(double(a - b)) < 1e-15)\n%! assert (~strcmp(sa, sb))\n\n%!test\n%! % these should *not* be the same\n%! x = vpa('1/3', 32);\n%! y = vpa(sym(1)/3, 32);\n%! z = vpa(1/3, 32);\n%! assert (isequal (x, y))\n%! assert (~isequal (x, z))\n\n%!test\n%! % big integers\n%! a = int64(12345678);\n%! a = a*a;\n%! b = vpa(a);\n%! c = vpa('152415765279684');\n%! assert (isequal (b, c))\n\n%!test\n%! % big integers (workaround poor num2str, works in 4.0?)\n%! a = int64(1234567891);  a = a*a;\n%! b = vpa(a);\n%! c = vpa('1524157877488187881');\n%! assert (isequal (b, c))\n\n%!warning <dangerous> vpa ('sqrt(2.0)');\n\n%!warning <dangerous>\n%! if (pycall_sympy__ ('return Version(spver) > Version(\"1.4\")'))\n%! a = vpa('2**0.5');\n%! b = vpa(sqrt(sym(2)));\n%! assert (isequal (a, b))\n%! else\n%! warning('dangerous')  % fake it until we drop 1.4\n%! end\n\n%!test\n%! a = vpa('2.3e1');\n%! b = vpa(' 2.3e+1 ');\n%! assert (isequal (a, b))\n%! a = vpa('21e-1');\n%! b = vpa('2.1');\n%! assert (isequal (a, b))\n\n%!test\n%! % Issue #859, operations on immutable matrices\n%! x = vpa (sym ([1 2]));\n%! % If vpa no longer makes an ImmutableDenseMatrix,\n%! % may need to adjust or remove this test.\n%! assert (~ isempty (strfind (sympy (x), 'Immutable')))\n%! y = sin(x);\n%! y2 = [sin(vpa(sym(1))) sin(vpa(sym(2)))];\n%! assert (isequal (y, y2))\n", "meta": {"author": "cbm755", "repo": "octsympy", "sha": "c1ecd1e08f027d5101d0f4250dfc496aa98c8bcd", "save_path": "github-repos/MATLAB/cbm755-octsympy", "path": "github-repos/MATLAB/cbm755-octsympy/octsympy-c1ecd1e08f027d5101d0f4250dfc496aa98c8bcd/inst/vpa.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.4148988457967688, "lm_q2_score": 0.14223189500989633, "lm_q1q2_score": 0.05901184907509319}}
{"text": "function [ a, b ] = p21_lim ( )\n\n%*****************************************************************************80\n%\n%% P21_LIM returns the integration limits for problem 21.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    04 November 2009\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real A, B, the limits of integration.\n%\n  a = 0.0;\n  b = 1.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_int/p21_lim.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.3923368301671084, "lm_q2_score": 0.15002882244222637, "lm_q1q2_score": 0.05886183263068703}}
{"text": "function [out1, out2] = templateFunction(arg1, arg2, arg3)\n% This function does this and that\n%\n% USAGE:\n%\n%   [out1, out2] = templateFunction(arg1, arg2, arg3)\n%\n% INPUTS:\n%    arg1: a short description for this argument\n%    arg2: another argument\n%\n% OPTIONAL INPUT:\n%    arg3: optional argument\n%\n% OUTPUT:\n%    out1: the product of arg1 and arg2\n%\n% OPTIONAL OUTPUT:\n%    out2: the product of arg1, arg2 and arg3\n%\n% EXAMPLE:\n%\n%   [out1, out2] = templateFunction(1, 2, 3);\n%   >> out1 = 2\n%   >> out2 = 6\n%\n% .. Authors: - myself\n%             - laurent\n%\nif nargin < 3\n    arg3 = 1;\nend\n\nout1 = arg1 * arg2;\n\nif nargout > 1\n    out2 = out1 * arg3;\nend\n", "meta": {"author": "opencobra", "repo": "cobratoolbox", "sha": "e60274d127f65d518535fd0814d20c53dc530f73", "save_path": "github-repos/MATLAB/opencobra-cobratoolbox", "path": "github-repos/MATLAB/opencobra-cobratoolbox/cobratoolbox-e60274d127f65d518535fd0814d20c53dc530f73/docs/source/modules/templateFunction.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.35220178204788966, "lm_q2_score": 0.16667539640920673, "lm_q1q2_score": 0.05870337163886104}}
{"text": "function range = p15_range ( )\n\n%*****************************************************************************80\n%\n%% P15_RANGE returns an interval bounding the root for problem 15.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    06 May 2011\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real RANGE(2), the minimum and maximum values of\n%    an interval containing the root.\n%\n  range(1) = - 10.0;\n  range(2) =   10.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_zero/p15_range.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.42250463481418826, "lm_q2_score": 0.13846179056896438, "lm_q1q2_score": 0.05850074826005891}}
{"text": "function [ a, b ] = p05_lim ( )\n\n%*****************************************************************************80\n%\n%% P05_LIM returns the integration limits for problem 5.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    17 January 2009\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real A(2), B(2), the lower and upper limits of integration.\n%\n  a(1:2) = 0.0;\n  b(1:2) = 1.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_int_2d/p05_lim.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.4339814648038986, "lm_q2_score": 0.1347759313241159, "lm_q1q2_score": 0.058490256096349454}}
{"text": "function a = r8mat_diag_set_vector ( n, a, v )\n\n%*****************************************************************************80\n%\n%% R8MAT_DIAG_SET_VECTOR sets the diagonal of a matrix to a vector.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    18 April 2005\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Input, integer N, the number of rows and columns of the matrix.\n%\n%    Input, real A(N,N), the matrix.\n%\n%    Input, real V(N), the vector to be assigned to the\n%    diagonal of A.\n%\n%    Output, real A(N,N), the modified matrix.\n%\n  for i = 1 : n\n    a(i,i) = v(i);\n  end\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/r8lib/r8mat_diag_set_vector.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.4263215925474903, "lm_q2_score": 0.13660838826867902, "lm_q1q2_score": 0.05823910564204913}}
{"text": "function p = pshift ( p, x0, y0 )\n\n%*****************************************************************************80\n%\n%% PSHIFT shifts a set of points by a given increment.\n%\n%  Licensing:\n%\n%    (C) 2004 Per-Olof Persson. \n%    See COPYRIGHT.TXT for details.\n%\n%  Reference:\n%\n%    Per-Olof Persson and Gilbert Strang,\n%    A Simple Mesh Generator in MATLAB,\n%    SIAM Review,\n%    Volume 46, Number 2, June 2004, pages 329-345.\n%\n%  Parameters:\n%\n%    Input/output, real P(NP,2), a set of points to be shifted.\n%\n%    Input, real X0, Y0, the X and Y increments to be added to each point.\n%\n  p(:,1) = p(:,1) + x0;\n  p(:,2) = p(:,2) + y0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/distmesh/pshift.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.46879062662624377, "lm_q2_score": 0.12421301969912354, "lm_q1q2_score": 0.05822989933989009}}
{"text": "function [ a, b ] = p01_lim ( )\n\n%*****************************************************************************80\n%\n%% P01_LIM returns the integration limits for problem 1.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    17 January 2009\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real A(2), B(2), the lower and upper limits of integration.\n%\n  a(1:2) = 0.0;\n  b(1:2) = 1.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_int_2d/p01_lim.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.3702253925955866, "lm_q2_score": 0.15610490333452273, "lm_q1q2_score": 0.05779399912311978}}
{"text": "function plotData(x, y)\n%PLOTDATA Plots the data points x and y into a new figure \n%   PLOTDATA(x,y) plots the data points and gives the figure axes labels of\n%   population and profit.\n\n% ====================== YOUR CODE HERE ======================\n% Instructions: Plot the training data into a figure using the \n%               \"figure\" and \"plot\" commands. Set the axes labels using\n%               the \"xlabel\" and \"ylabel\" commands. Assume the \n%               population and revenue data have been passed in\n%               as the x and y arguments of this function.\n%\n% Hint: You can use the 'rx' option with plot to have the markers\n%       appear as red crosses. Furthermore, you can make the\n%       markers larger by using plot(..., 'rx', 'MarkerSize', 10);\n\nfigure; % open a new figure window\n\n\n\n\n\n\n% ============================================================\n\nend\n", "meta": {"author": "zsiciarz", "repo": "ml-coursera", "sha": "54208ee72b88f1dc3c9235e644a47f618b80441c", "save_path": "github-repos/MATLAB/zsiciarz-ml-coursera", "path": "github-repos/MATLAB/zsiciarz-ml-coursera/ml-coursera-54208ee72b88f1dc3c9235e644a47f618b80441c/octave/ex1/plotData.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.26588047309981694, "lm_q2_score": 0.21733751597763018, "lm_q1q2_score": 0.057785801570471335}}
{"text": "function title = p01_title ( )\n\n%*****************************************************************************80\n%\n%% P01_TITLE returns a title for problem 1.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    25 February 2002\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, string TITLE, a title for the problem.\n%\n  title = 'Simple quadratic, (x-2)^2+1.';\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_min/p01_title.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.3738758227716966, "lm_q2_score": 0.15405756074950905, "lm_q1q2_score": 0.05759839727942333}}
{"text": "%CCODEFUNCTIONSTRING Converts a symbolic expression into a C-code function\n%\n% [FUNSTR, HDRSTR] = ccodefunctionstring(SYMEXPR, ARGLIST) returns a string\n% representing a C-code implementation of a symbolic expression SYMEXPR.\n% The C-code implementation has a signature of the form:\n%\n%         void funname(double[][n_o] out, const double in1, \n%           const double* in2, const double[][n_i] in3);\n%\n% depending on the number of inputs to the function as well as the\n% dimensionality of the inputs (n_i) and the output (n_o).\n% The whole C-code implementation is returned in FUNSTR, while HDRSTR\n% contains just the signature ending with a semi-colon (for the use in \n% header files).\n%\n% Options::\n% 'funname',name    Specify the name of the generated C-function. If\n%                   this optional argument is omitted, the variable name \n%                   of the first input argument is used, if possible.\n% 'output',outVar   Defines the identifier of the output variable in the C-function.\n% 'vars',varCells   The inputs to the C-code function must be defined as a cell array. The\n%                   elements of this cell array contain the symbolic variables required to\n%                   compute the output. The elements may be scalars, vectors or matrices\n%                   symbolic variables. The C-function prototype will be composed accoringly\n%                   as exemplified above.\n% 'flag',sig        Specifies if function signature only is generated, default (false).\n%\n% Example::\n%          % Create symbolic variables\n%          syms q1 q2 q3\n%\n%          Q = [q1 q2 q3];\n%          % Create symbolic expression\n%          myrot = rotz(q3)*roty(q2)*rotx(q1)\n%\n%          % Generate C-function string\n%          [funstr, hdrstr] = ccodefunctionstring(myrot,'output','foo', ...\n%          'vars',{Q},'funname','rotate_xyz')\n%\n% Notes::\n% - The function wraps around the built-in Matlab function 'ccode'. It does\n%   not check for proper C syntax. You must take care of proper\n%   dimensionality of inputs and outputs with respect to your symbolic\n%   expression on your own. Otherwise the generated C-function may not\n%   compile as desired.\n%\n% Author::\n%  Joern Malzahn, (joern.malzahn@tu-dortmund.de)\n%\n% See also ccode, matlabFunction.\n\n% Copyright (C) 2012-2018, by Joern Malzahn\n%\n% This file is part of The Robotics Toolbox for MATLAB (RTB).\n%\n% RTB is free software: you can redistribute it and/or modify\n% it under the terms of the GNU Lesser General Public License as published by\n% the Free Software Foundation, either version 3 of the License, or\n% (at your option) any later version.\n%\n% RTB is distributed in the hope that it will be useful,\n% but WITHOUT ANY WARRANTY; without even the implied warranty of\n% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n% GNU Lesser General Public License for more details.\n%\n% You should have received a copy of the GNU Leser General Public License\n% along with RTB.  If not, see <http://www.gnu.org/licenses/>.\n%\n% http://www.petercorke.com\n\nfunction [funstr hdrstr] = ccodefunctionstring(f,varargin)\n\n\n% option defaults\nopt.funname = inputname(1);\nopt.output{1} = zeros(size(f));\nopt.outputName{1} = inputname(1);\nopt.flag = 0;\n\nif isempty(opt.outputName{1})\n    opt.outputName{1} = 'myout';\nend\nopt.vars = {};\n\n% tb_optparse is not applicable here,\n% since handling cell inputs and extracting input variable names is\n% required.\n% Thus, scan varargin manually:\nif mod(nargin,2)==0\n    error('CodeGenerator:codefunctionstring:wrongArgumentList',...\n        'Wrong number of elements in the argument list.');\nend\nfor iArg = 1:2:nargin-1\n    switch lower(varargin{iArg})\n        case 'funname'\n            opt.funname = varargin{iArg+1};\n        case 'output'\n            if ~isempty(varargin{iArg+1})\n                opt.outputName{1} = varargin{iArg+1};\n            end\n        case 'vars'\n            opt.vars = varargin{iArg+1};\n        case 'flag'\n            opt.flag = varargin{iArg+1};\n        otherwise\n            error('ccodefunctionstring:unknownArgument',...\n                ['Argument ',inputname(iArg),' unknown.']);\n    end\nend\n\nnOut = numel(opt.output);\nnIn = numel(opt.vars);\n\n%% Function signature\nfunstr = sprintf('void %s(', opt.funname);\ninitstr = '';\n\n% outputs\nfor iOut = 1:nOut\n    tmpOutName = opt.outputName{iOut};\n    tmpOut = opt.output{iOut};\n    \n    if ~isscalar(tmpOut);\n        funstr = [funstr, sprintf('double %s[][%u]', tmpOutName, size(tmpOut,1) ) ];\n        for iRow = 1:size(tmpOut,1)\n            for iCol = 1:size(tmpOut,2)\n                initstr = sprintf(' %s %s[%u][%u]=0;\\n',initstr,tmpOutName,iCol-1,iRow-1);\n            end\n        end\n    else\n        funstr = [funstr, sprintf('double %s', tmpOutName ) ];\n    end\n    \n    % separate argument list by commas\n    if ( iOut ~= nOut ) || ( nIn > 0 )\n        funstr = [funstr,', '];\n    end\n    \nend\n\n% inputs\nfor iIn = 1:nIn\n    tmpInName = ['input',num2str(iIn)];%opt.varsName{iIn};\n    tmpIn = opt.vars{iIn};\n    \n    % treat different dimensionality of input variables\n    if isscalar(tmpIn)\n        funstr = [funstr, sprintf('const double %s', tmpInName ) ];\n    elseif isvector(tmpIn)\n        funstr = [funstr, sprintf('const double* %s', tmpInName ) ];\n    elseif ismatrix(tmpIn)\n        funstr = [funstr, sprintf('const double %s[][%u]', tmpInName, size(tmpIn,2) ) ];\n    else\n        error('ccodefunctionstring:UnsupportedOutputType', 'Unsupported datatype for %s', tmpOutName)\n    end\n    \n    % separate argument list by commas\n    if ( iIn ~= nIn )\n        funstr = [funstr,', '];\n    end\n    \nend\nfunstr = [funstr,sprintf('%s', ')')];\n\n% finalize signature for the use in header files\nif nargout > 1\n    hdrstr = [funstr,sprintf('%s', ';')];\nend\nif opt.flag\n    return;         %% STOP IF FLAG == TRUE\nend\n\n% finalize signature for use in function definition\nfunstr = [funstr,sprintf('%s', '{')];\nfunstr = sprintf('%s\\n%s',funstr,sprintf('%s', ' ') ); % empty line\n\n%% Function body\n% input paramter expansion\nfor iIn = 1:nIn\n    tmpInName = ['input',num2str(iIn)];%opt.varsName{iIn};\n    tmpIn = opt.vars{iIn};\n    \n    % for scalars\n    %   -> do nothing\n    \n    % for vectors\n    if ~isscalar(tmpIn) && isvector(tmpIn)\n        nEl = numel(tmpIn);\n        for iEl = 1:nEl\n            funstr = sprintf('%s\\n%s',...\n                funstr,...\n                sprintf('  double %s = %s[%u];', char(tmpIn(iEl)), tmpInName,iEl-1 ));\n        end\n        \n        % for matrices\n    elseif ~isscalar(tmpIn) && ~isvector(tmpIn) && ismatrix(tmpIn)\n        nRow = size(tmpIn,1);\n        nCol = size(tmpIn,2);\n        for iRow = 1:nRow\n            for iCol = 1:nCol\n                \n                funstr = sprintf('%s\\n%s',...\n                    funstr,...\n                    sprintf('  double %s%u%u = %s[%u][%u];', char(tmpIn(iRow,iCol)), iRow, iCol, tmpInName{iIn},iRow-1,iCol-1 ));\n            end\n        end\n    end\n    \nend\n\nfunstr = sprintf('%s\\n%s',...\n    funstr,...\n    sprintf('%s', ' ') );\nfunstr = sprintf('%s\\n%s',...\n    funstr,...\n    sprintf('%s\\n\\n', initstr) );\n\n% Actual code\n% use f.' here, because of column/row indexing in C\ncodestr = '';\nif ~isequal(f, sym(zeros(size(f))))\n    eval([opt.outputName{1}, ' = f.''; codestr = ccode(',opt.outputName{1},');'])\nend\n\nif isscalar(f)\n    % in the case of scalar expressions the resulting ccode always\n    % begins with '  t0'. Replace that with the desired name.\n    codestr = strrep(codestr,'t0',opt.outputName{1});\nend\n\nfunstr = sprintf('%s\\n%s',...\n    funstr,...\n    codestr );\n\nfunstr = sprintf('%s\\n%s',...\n    funstr,sprintf('%s', '}') );\nfunstr = sprintf('%s\\n%s',...\n    funstr,sprintf('%s', ' ') ); % empty line\n", "meta": {"author": "petercorke", "repo": "robotics-toolbox-matlab", "sha": "bd7a9d75176c660f43fc799b24d838f70b02250c", "save_path": "github-repos/MATLAB/petercorke-robotics-toolbox-matlab", "path": "github-repos/MATLAB/petercorke-robotics-toolbox-matlab/robotics-toolbox-matlab-bd7a9d75176c660f43fc799b24d838f70b02250c/ccodefunctionstring.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.49609382947091946, "lm_q2_score": 0.11596071978154186, "lm_q1q2_score": 0.05752739754462931}}
{"text": "function v = vec( x )\n\n% VEC   Vectorize.\n%    VEC(X), where X is a vector, matrix, or N-D array, returns a column vector\n%    containing all of the elements of X; i.e., VEC(X)=X(:).\n\nv = reshape( x, numel( x ), 1 );\n\n% Copyright 2005-2016 CVX Research, Inc.\n% See the file LICENSE.txt for full copyright information.\n% The command 'cvx_where' will show where this file is located.\n", "meta": {"author": "cvxr", "repo": "CVX", "sha": "a7b46e7840c3ccf3f35df374d2ff3da4eaafc3cd", "save_path": "github-repos/MATLAB/cvxr-CVX", "path": "github-repos/MATLAB/cvxr-CVX/CVX-a7b46e7840c3ccf3f35df374d2ff3da4eaafc3cd/functions/vec_/vec.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.4493926197162523, "lm_q2_score": 0.1276526153656607, "lm_q1q2_score": 0.05736614323280538}}
{"text": "function [mbar] = hPa2mbar(hPa)\n% Convert pressure from hectopascals to millibars. \n% They're the same! \n% Chad Greene 2012\nmbar = hPa;", "meta": {"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/35258-unit-converters/unit_converters/hPa2mbar.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.36658975016245987, "lm_q2_score": 0.15610489940847916, "lm_q1q2_score": 0.057226456073290306}}
{"text": "function [ a, b ] = p51_lim ( )\n\n%*****************************************************************************80\n%\n%% P51_LIM returns the integration limits for problem 51.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    04 November 2009\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real A, B, the limits of integration.\n%\n  a = 0.0;\n  b = 1.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_int/p51_lim.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.3702253925955866, "lm_q2_score": 0.15203223970113983, "lm_q1q2_score": 0.056286195630540825}}
{"text": "function ch = digit_oct_to_ch ( i )\n\n%*****************************************************************************80\n%\n%% DIGIT_OCT_TO_CH returns the character representation of an octal digit.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    23 April 2011\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Input, integer I, the integer, between 0 and 7.\n%\n%    Output, character CH, the octal representation of the integer.\n%\n  if ( 0 <= i && i <= 7 )\n    ch = char ( '0' + i );\n  else\n    ch = '?';\n  end\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/chrpak/digit_oct_to_ch.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.4649015713733885, "lm_q2_score": 0.12085324515618749, "lm_q1q2_score": 0.056184863578684914}}
{"text": "function files_multiple ( )\n\n%*****************************************************************************80\n%\n%% FILES_MULTIPLE demonstrates how to work with multiple files.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license. \n%\n%  Modified:\n%\n%    01 December 2012\n%\n%  Author:\n%\n%    John Burkardt\n%\n  timestamp ( );\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, 'FILES_MULTIPLE:\\n' );\n  fprintf ( 1, '  MATLAB version.\\n' );\n  fprintf ( 1, '  Demonstrate how to work with multiple files.\\n' );\n\n  files_multiple_test01 ( );\n  files_multiple_test02 ( );\n%\n%  Terminate.\n%\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, 'FILES_MULTIPLE:\\n' );\n  fprintf ( 1, '  Normal end of execution.\\n' );\n  fprintf ( 1, '\\n' );\n  timestamp ( );\n\n  return\nend\nfunction files_multiple_test01 ( )\n\n%*****************************************************************************80\n%\n%% TEST01 writes data to four files which are open simultaneously.\n%\n%  Discussion:\n%\n%    The files contain the integers which are divisible by 2, 3, 5, and 7.\n%\n%    divisor1.txt  divisor2.txt  divisor3.txt  divisor4.txt\n%        0             0             0             0\n%        2             3             5             7\n%        4             6            10            14\n%        6             9            15            21\n%        8            12            20            28\n%       ...\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license. \n%\n%  Modified:\n%\n%    19 September 2012\n%\n%  Author:\n%\n%    John Burkardt\n%\n\n%\n%  FILENUM can be increased, and the program will still work the same way.\n%\n  filenum = 4;\n\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, 'FILES_MULTIPLE_TEST01\\n' );\n  fprintf ( 1, '  Create 4 files, and count to 100.\\n' );\n  fprintf ( 1, '  \"divisor1.txt\" will contain multiples of 2;\\n' );\n  fprintf ( 1, '  \"divisor2.txt\" will contain multiples of 3;\\n' );\n  fprintf ( 1, '  \"divisor3.txt\" will contain multiples of 5;\\n' );\n  fprintf ( 1, '  \"divisor4.txt\" will contain multiples of 7;\\n' );\n%\n%  Set the divisors.\n%  PRIME is a function which can return the I-th prime number.\n%\n  for i = 1 : filenum\n    divisor(i) = prime ( i );\n  end\n%\n%  Define the file names for an arbitrary number of files\n%  by incrementing the numeric information in a \"template\".\n%\n  template = 'divisor0.txt';\n\n  for i = 1 : filenum\n    template = filename_inc ( template );\n    filename(i,:) = template(:);\n  end\n%\n%  Associate a unit number with each file.\n%\n  for i = 1 : filenum\n    fileunit(i) = fopen ( filename(i,:), 'wt' );\n    fprintf ( fileunit(i), 'Multiples of %d\\n', divisor(i) );\n  end\n\n  for j = 0 : 100\n    for i = 1 : filenum\n      if ( mod ( j, divisor(i) ) == 0 )\n        fprintf ( fileunit(i), '%d\\n', j );\n      end\n    end\n  end\n%\n%  Close the files.\n%\n  for i = 1 : filenum\n    fclose ( fileunit(i) );\n  end\n\n  return\nend\nfunction files_multiple_test02 ( )\n\n%*****************************************************************************80\n%\n%% FILES_MULTIPLE_TEST02 writes selected data to four files which are open simultaneously.\n%\n%  Discussion:\n%\n%    The vector X contains 100 random numbers, and we update X 20 times.\n%    We want to keep track of X(10), X(25), X(64) and X(81) on each step.\n%\n%              x1.txt        x2.txt        x3.txt        x4.txt\n%           X(10) values  X(25) values  X(64) values  X(81) values\n%     1         2.1           1.7           5.3           9.8\n%     2         2.0           3.6           6.2           7.3\n%     3         2.5           4.1           5.9           6.8\n%    ..   \n%    10         5.0           5.2           5.3           5.6\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license. \n%\n%  Modified:\n%\n%    01 December 2012\n%\n%  Author:\n%\n%    John Burkardt\n%\n\n%\n%  FILENUM can be increased, but more entries in K would have to be defined\n%  by the user.\n%\n  filenum = 4;\n  n = 100;\n\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, 'FILES_MULTIPLE_TEST02\\n' );\n  fprintf ( 1, '  Create 4 files.\\n' );\n  fprintf ( 1, '  The vector X contains 100 values,\\n' );\n  fprintf ( 1, '  and is set 20 times.\\n' );\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, '  Write X(10), X(25), X(64) and X(81) to the files\\n' );\n  fprintf ( 1, '  \"x1.txt\", \"x2.txt\", \"x3.txt\" and \"x4.txt\"\\n' );\n%\n%  Define the selected X indices.\n%\n  k(1:4) = [ 10, 25, 64, 81 ];\n%\n%  Define the file names for an arbitrary number of files\n%  by incrementing the numeric information in a \"template\".\n%\n  template = 'x0.txt';\n\n  for i = 1 : filenum\n    template = filename_inc ( template );\n    filename(i,:) = template(:);\n  end\n%\n%  Associate a unit number with each file\n%\n  for i = 1 : filenum\n    fileunit(i) = fopen ( filename(i,:), 'wt' );\n    fprintf ( fileunit(i), 'Values of X(%d)\\n', k(i) );\n  end\n%\n%  Initial X vector is random.\n%\n  seed = 123456789;\n  [ x, seed ] = r8vec_uniform_01 ( n, seed );\n%\n%  Write selected data to file, then update data.\n%\n  for j = 0 : 20\n\n    for i = 1 : filenum\n      fprintf ( fileunit(i), '  %2d  %14.6g\\n', j, x(k(i)) );\n    end\n\n    if ( j < 20 )\n      y(1) = ( x(1) + x(2) ) / 2.0;\n      y(2:99) = ( x(1:98) + x(2:99) + x(3:100) ) / 3.0;\n      y(100) = ( x(99) + x(100) ) / 2.0;\n\n      x(1:100) = y(1:100);\n    end\n\n  end\n%\n%  Close the files.\n%\n  for i = 1 : filenum\n    fclose ( fileunit(i) );\n  end\n\n  return\nend\nfunction filename = filename_inc ( filename )\n\n%*****************************************************************************80\n%\n%% FILENAME_INC increments a partially numeric filename.\n%\n%  Discussion:\n%\n%    It is assumed that the digits in the name, whether scattered or\n%    connected, represent a number that is to be increased by 1 on\n%    each call.  If this number is all 9's on input, the output number\n%    is all 0's.  Non-numeric letters of the name are unaffected..\n%\n%    If the name is empty, then the routine stops.\n%\n%    If the name contains no digits, the empty string is returned.\n%\n%  Example:\n%\n%      Input            Output\n%      -----            ------\n%      'a7to11.txt'     'a7to12.txt'  (typical case.  Last digit incremented)\n%      'a7to99.txt'     'a8to00.txt'  (last digit incremented, with carry.)\n%      'a9to99.txt'     'a0to00.txt'  (wrap around)\n%      'cat.txt'        ' '           (no digits in input name.)\n%      ' '              STOP%         (error.)\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    22 November 2011\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Input, string FILENAME, the string to be incremented.\n%\n%    Output, string FILENAME, the incremented string.\n%\n  lens = length ( filename );\n\n  if ( lens <= 0 )\n    fprintf ( 1, '\\n' );\n    fprintf ( 1, 'FILENAME_INC - Fatal error%\\n' );\n    fprintf ( 1, '  The input filename is empty.\\n' );\n    error ( 'FILENAME_INC - Fatal error%' );\n  end\n\n  change = 0;\n\n  for i = lens : -1 : 1\n\n    c = filename(i);\n\n    if ( '0' <= c && c <= '8' )\n\n      c = c + 1;\n      \n      filename(i) = c;\n\n      return\n\n    elseif ( c == '9' )\n\n      change = change + 1;\n\n      c = '0';\n      \n      filename(i) = c;\n\n    end\n\n  end\n%\n%  No digits were found.  Return blank.\n%\n  if ( change == 0 )\n    filename = ' ';\n  end\n\n  return\nend\nfunction p = prime ( n )\n\n%*****************************************************************************80\n%\n%% PRIME returns returns any of the first PRIME_MAX prime numbers.\n%\n%  Discussion:\n%\n%    PRIME_MAX is 1600, and the largest prime stored is 13499.\n%\n%    Thanks to Bart Vandewoestyne for pointing out a typo, 18 February 2005.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    18 February 2005\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Reference:\n%\n%    Milton Abramowitz and Irene Stegun,\n%    Handbook of Mathematical Functions,\n%    US Department of Commerce, 1964, pages 870-873.\n%\n%    Daniel Zwillinger,\n%    CRC Standard Mathematical Tables and Formulae,\n%    30th Edition,\n%    CRC Press, 1996, pages 95-98.\n%\n%  Parameters:\n%\n%    Input, integer N, the index of the desired prime number.\n%    In general, is should be true that 0 <= N <= PRIME_MAX.\n%    N = -1 returns PRIME_MAX, the index of the largest prime available.\n%    N = 0 is legal, returning PRIME = 1.\n%\n%    Output, integer P, the N-th prime.  If N is out of range, P\n%    is returned as -1.\n%\n  prime_max = 1600;\n\n  prime_vector(1:1600) = [\n        2,    3,    5,    7,   11,   13,   17,   19,   23,   29, ...\n       31,   37,   41,   43,   47,   53,   59,   61,   67,   71, ...\n       73,   79,   83,   89,   97,  101,  103,  107,  109,  113, ...\n      127,  131,  137,  139,  149,  151,  157,  163,  167,  173, ...\n      179,  181,  191,  193,  197,  199,  211,  223,  227,  229, ...\n      233,  239,  241,  251,  257,  263,  269,  271,  277,  281, ...\n      283,  293,  307,  311,  313,  317,  331,  337,  347,  349, ...\n      353,  359,  367,  373,  379,  383,  389,  397,  401,  409, ...\n      419,  421,  431,  433,  439,  443,  449,  457,  461,  463, ...\n      467,  479,  487,  491,  499,  503,  509,  521,  523,  541, ...\n      547,  557,  563,  569,  571,  577,  587,  593,  599,  601, ...\n      607,  613,  617,  619,  631,  641,  643,  647,  653,  659, ...\n      661,  673,  677,  683,  691,  701,  709,  719,  727,  733, ...\n      739,  743,  751,  757,  761,  769,  773,  787,  797,  809, ...\n      811,  821,  823,  827,  829,  839,  853,  857,  859,  863, ...\n      877,  881,  883,  887,  907,  911,  919,  929,  937,  941, ...\n      947,  953,  967,  971,  977,  983,  991,  997, 1009, 1013, ...\n     1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, ...\n     1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, ...\n     1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, ...\n     1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, ...\n     1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, ...\n     1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, ...\n     1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, ...\n     1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, ...\n     1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, ...\n     1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, ...\n     1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, ...\n     1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, ...\n     1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, ...\n     1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, ...\n     2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, ...\n     2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, ...\n     2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, ...\n     2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, ...\n     2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, ...\n     2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, ...\n     2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, ...\n     2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, ...\n     2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, ...\n     2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, ...\n     2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, ...\n     2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, ...\n     3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, ...\n     3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, ...\n     3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, ...\n     3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, ...\n     3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, ...\n     3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, ...\n     3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, ...\n     3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, ...\n     3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, ...\n     3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, ...\n     3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, ...\n     3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, ...\n     4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, ...\n     4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, ...\n     4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, ...\n     4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, ...\n     4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, ...\n     4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, ...\n     4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, ...\n     4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, ...\n     4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, ...\n     4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, ...\n     4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, ...\n     4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, ...\n     5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, ...\n     5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, ...\n     5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, ...\n     5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, ...\n     5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, ...\n     5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, ...\n     5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, ...\n     5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, ...\n     5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, ...\n     5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, ...\n     5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, ...\n     5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, ...\n     6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, ...\n     6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, ...\n     6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, ...\n     6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, ...\n     6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, ...\n     6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, ...\n     6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, ...\n     6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, ...\n     6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, ...\n     6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, ...\n     6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, ...\n     7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, ...\n     7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, ...\n     7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, ...\n     7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, ...\n     7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, ...\n     7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, ...\n     7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, ...\n     7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, ...\n     7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, ...\n     7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, ...\n     7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, ...\n     8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, ...\n     8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, ...\n     8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, ...\n     8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, ...\n     8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, ...\n     8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, ...\n     8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, ...\n     8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, ...\n     8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, ...\n     8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, ...\n     8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, ...\n     9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, ...\n     9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, ...\n     9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, ...\n     9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, ...\n     9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, ...\n     9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, ...\n     9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, ...\n     9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, ...\n     9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, ...\n     9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, ...\n     9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973,10007, ...\n    10009,10037,10039,10061,10067,10069,10079,10091,10093,10099, ...\n    10103,10111,10133,10139,10141,10151,10159,10163,10169,10177, ...\n    10181,10193,10211,10223,10243,10247,10253,10259,10267,10271, ...\n    10273,10289,10301,10303,10313,10321,10331,10333,10337,10343, ...\n    10357,10369,10391,10399,10427,10429,10433,10453,10457,10459, ...\n    10463,10477,10487,10499,10501,10513,10529,10531,10559,10567, ...\n    10589,10597,10601,10607,10613,10627,10631,10639,10651,10657, ...\n    10663,10667,10687,10691,10709,10711,10723,10729,10733,10739, ...\n    10753,10771,10781,10789,10799,10831,10837,10847,10853,10859, ...\n    10861,10867,10883,10889,10891,10903,10909,10937,10939,10949, ...\n    10957,10973,10979,10987,10993,11003,11027,11047,11057,11059, ...\n    11069,11071,11083,11087,11093,11113,11117,11119,11131,11149, ...\n    11159,11161,11171,11173,11177,11197,11213,11239,11243,11251, ...\n    11257,11261,11273,11279,11287,11299,11311,11317,11321,11329, ...\n    11351,11353,11369,11383,11393,11399,11411,11423,11437,11443, ...\n    11447,11467,11471,11483,11489,11491,11497,11503,11519,11527, ...\n    11549,11551,11579,11587,11593,11597,11617,11621,11633,11657, ...\n    11677,11681,11689,11699,11701,11717,11719,11731,11743,11777, ...\n    11779,11783,11789,11801,11807,11813,11821,11827,11831,11833, ...\n    11839,11863,11867,11887,11897,11903,11909,11923,11927,11933, ...\n    11939,11941,11953,11959,11969,11971,11981,11987,12007,12011, ...\n    12037,12041,12043,12049,12071,12073,12097,12101,12107,12109, ...\n    12113,12119,12143,12149,12157,12161,12163,12197,12203,12211, ...\n    12227,12239,12241,12251,12253,12263,12269,12277,12281,12289, ...\n    12301,12323,12329,12343,12347,12373,12377,12379,12391,12401, ...\n    12409,12413,12421,12433,12437,12451,12457,12473,12479,12487, ...\n    12491,12497,12503,12511,12517,12527,12539,12541,12547,12553, ...\n    12569,12577,12583,12589,12601,12611,12613,12619,12637,12641, ...\n    12647,12653,12659,12671,12689,12697,12703,12713,12721,12739, ...\n    12743,12757,12763,12781,12791,12799,12809,12821,12823,12829, ...\n    12841,12853,12889,12893,12899,12907,12911,12917,12919,12923, ...\n    12941,12953,12959,12967,12973,12979,12983,13001,13003,13007, ...\n    13009,13033,13037,13043,13049,13063,13093,13099,13103,13109, ...\n    13121,13127,13147,13151,13159,13163,13171,13177,13183,13187, ...\n    13217,13219,13229,13241,13249,13259,13267,13291,13297,13309, ...\n    13313,13327,13331,13337,13339,13367,13381,13397,13399,13411, ...\n    13417,13421,13441,13451,13457,13463,13469,13477,13487,13499 ];\n\n  if ( n == -1 )\n    p = prime_max;\n  elseif ( n == 0 )\n    p = 1;\n  elseif ( n <= prime_max )\n    p = prime_vector(n);\n  else\n    p = -1;\n  end\n\n  return\nend\nfunction [ r, seed ] = r8vec_uniform_01 ( n, seed )\n\n%*****************************************************************************80\n%\n%% R8VEC_UNIFORM_01 returns a unit pseudorandom R8VEC.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    21 September 2006\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Reference:\n%\n%    Paul Bratley, Bennett Fox, Linus Schrage,\n%    A Guide to Simulation,\n%    Springer Verlag, pages 201-202, 1983.\n%\n%    Bennett Fox,\n%    Algorithm 647:\n%    Implementation and Relative Efficiency of Quasirandom\n%    Sequence Generators,\n%    ACM Transactions on Mathematical Software,\n%    Volume 12, Number 4, pages 362-376, 1986.\n%\n%    Peter Lewis, Allen Goodman, James Miller,\n%    A Pseudo-Random Number Generator for the System/360,\n%    IBM Systems Journal,\n%    Volume 8, pages 136-143, 1969.\n%\n%  Parameters:\n%\n%    Input, integer N, the number of entries in the vector.\n%\n%    Input, integer SEED, a seed for the random number generator.\n%\n%    Output, real R(N), the vector of pseudorandom values.\n%\n%    Output, integer SEED, an updated seed for the random number generator.\n%\n  r = zeros ( n, 1 );\n\n  if ( seed == 0 )\n    fprintf ( 1, '\\n' );\n    fprintf ( 1, 'R8VEC_UNIFORM_01 - Fatal error%\\n' );\n    fprintf ( 1, '  Input SEED = 0%\\n' );\n    error ( 'R8VEC_UNIFORM_01 - Fatal error%' );\n  end\n\n  for i = 1 : n\n\n    k = floor ( seed / 127773 );\n\n    seed = 16807 * ( seed - k * 127773 ) - k * 2836;\n\n    if ( seed < 0 )\n      seed = seed + 2147483647;\n    end\n\n    r(i) = seed * 4.656612875E-10;\n\n  end\n\n  return\nend\nfunction timestamp ( )\n\n%*****************************************************************************80\n%\n%% TIMESTAMP prints the current YMDHMS date as a timestamp.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    14 February 2003\n%\n%  Author:\n%\n%    John Burkardt\n%\n  t = now;\n  c = datevec ( t );\n  s = datestr ( c, 0 );\n  fprintf ( 1, '%s\\n', s );\n\n  return\nend\n\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/files_multiple/files_multiple.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.47268347662043286, "lm_q2_score": 0.11757214591334526, "lm_q1q2_score": 0.05557441068404486}}
{"text": "function i4vec_permute_uniform_test ( )\n\n%*****************************************************************************80\n%\n%% I4VEC_PERMUTE_UNIFORM_TEST tests I4VEC_PERMUTE_UNIFORM.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    23 May 2015\n%\n%  Author:\n%\n%    John Burkardt\n%\n  n = 12;\n  seed = 123456789;\n\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, 'I4VEC_PERMUTE_UNIFORM_TEST\\n' );\n  fprintf ( 1, '  I4VEC_PERMUTE_UNIFORM randomly reorders an I4VEC.\\n' );\n\n  a = 100 + ( 1 : n );\n\n  i4vec_print ( n, a, '  A, before rearrangement:' );\n\n  [ a, seed ] = i4vec_permute_uniform ( n, a, seed );\n\n  i4vec_print ( n, a, '  A, after rearrangement:' );\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/i4lib/i4vec_permute_uniform_test.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.47657965106367595, "lm_q2_score": 0.11596071672639166, "lm_q1q2_score": 0.055264517914557505}}
{"text": "function [output1,output2] = function_name(input1,input2,input3)\n%FUNCTION_NAME - One line description of what the function or script performs (H1 line)\n%Optional file header info (to give more details about the function than in the H1 line)\n%Optional file header info (to give more details about the function than in the H1 line)\n%Optional file header info (to give more details about the function than in the H1 line)\n%\n% Syntax:  [output1,output2] = function_name(input1,input2,input3)\n%\n% Inputs:\n%    input1 - Description\n%    input2 - Description\n%    input3 - Description\n%\n% Outputs:\n%    output1 - Description\n%    output2 - Description\n%\n% Example: \n%    Line 1 of example\n%    Line 2 of example\n%    Line 3 of example\n%\n% Other m-files required: none\n% Subfunctions: none\n% MAT-files required: none\n%\n% See also: OTHER_FUNCTION_NAME1,  OTHER_FUNCTION_NAME2\n\n% Author: Denis Gilbert, Ph.D., physical oceanography\n% Maurice Lamontagne Institute, Dept. of Fisheries and Oceans Canada\n% email address: gilbertd@dfo-mpo.gc.ca  \n% Website: http://www.qc.dfo-mpo.gc.ca/iml/\n% December 1999; Last revision: 12-May-2004\n\n%------------- BEGIN CODE --------------\n\nEnter your executable matlab commands here\n\n%------------- END OF CODE --------------\n", "meta": {"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/4908-m-file-header-template/template_dg.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.37754066879814546, "lm_q2_score": 0.1460872526248659, "lm_q1q2_score": 0.055153879058875505}}
{"text": "function value = halham_leap_check ( dim_num, leap )\n\n%*****************************************************************************80\n%\n%% HALHAM_LEAP_CHECK checks LEAP for a Halton or Hammersley sequence.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    21 September 2004\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Input, integer LEAP(1:DIM_NUM), the leap vector.  \n%    Each entry should be 1 or greater.  Only the integer\n%    part of a base is used.\n%\n%    Output, logical VALUE, is true if LEAP is legal.\n%\n  if ( any ( leap(1:dim_num) < 1 ) )\n    fprintf ( 1, '\\n' );\n    fprintf ( 1, 'HALHAM_LEAP_CHECK - Fatal error!\\n' );\n    fprintf ( 1, '  At least one of the input leap entries is <= 1!\\n' );\n    value = 0;\n  else\n    value = 1;\n  end\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/hammersley/halham_leap_check.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.48828339529583464, "lm_q2_score": 0.11279540031810142, "lm_q1q2_score": 0.05507612104107543}}
{"text": "function c8vec_norm_l1_test ( )\n\n%*****************************************************************************80\n%\n%% C8VEC_NORM_L1_TEST tests C8VEC_NORM_L1;\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    28 February 2015\n%\n%  Author:\n%\n%    John Burkardt\n%\n  n = 5;\n\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, 'C8VEC_NORM_L1_TEST\\n' );\n  fprintf ( 1, '  C8VEC_NORM_L1 computes the L1 norm of a C8VEC.\\n' );\n\n  a = c8vec_indicator ( n );\n \n  c8vec_print ( n, a, '  The \"indicator\" vector:' );\n\n  value = c8vec_norm_l1 ( n, a );\n\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, '  L1 norm = %g\\n', value );\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/c8lib/c8vec_norm_l1_test.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.48438008427698437, "lm_q2_score": 0.11279540031810142, "lm_q1q2_score": 0.05463584551213816}}
{"text": "function i4_is_triangular_test ( )\n\n%*****************************************************************************80\n%\n%% I4_IS_TRIANGULAR_TEST tests I4_IS_TRIANGULAR.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    02 January 2015\n%\n%  Author:\n%\n%    John Burkardt\n%\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, 'I4_IS_TRIANGULAR_TEST\\n' );\n  fprintf ( 1, '  I4_IS_TRIANGULAR returns T or F depending on\\n' );\n  fprintf ( 1, '  whether I is triangular.\\n' );\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, '   I   T/F\\n' );\n  fprintf ( 1, '\\n' );\n\n  for i = 0 : 20\n\n    l = i4_is_triangular ( i );\n\n    fprintf ( 1, '  %2d    %1d\\n',  i, l );\n\n  end\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/polpak/i4_is_triangular_test.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.35936414516010196, "lm_q2_score": 0.1520322377801054, "lm_q1q2_score": 0.05463493516662494}}
{"text": "function [ a, b ] = p47_lim ( )\n\n%*****************************************************************************80\n%\n%% P47_LIM returns the integration limits for problem 47.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    04 November 2009\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real A, B, the limits of integration.\n%\n  a = 0.0;\n  b = 1.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_int/p47_lim.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.3629691917376783, "lm_q2_score": 0.15002881864182907, "lm_q1q2_score": 0.05445583903978342}}
{"text": "function i2vec_print ( n, a, title )\n\n%*****************************************************************************80\n%\n%% I2VEC_PRINT prints an I2VEC.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    24 April 2005\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Input, integer N, the number of components of the vector.\n%\n%    Input, integer A(2,N), the vector to be printed.\n%\n%    Input, string TITLE, a title.\n%\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, '%s\\n', title );\n  fprintf ( 1, '\\n' );\n\n  for i = 1 : n\n    fprintf ( 1, '  %6d: %10d  %10d\\n', i, a(1:2,i) );\n  end\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/subpak/i2vec_print.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.4148988457967688, "lm_q2_score": 0.13117321866710235, "lm_q1q2_score": 0.05442361702442793}}
{"text": "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% chvtr.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n% function chvtr(f,vtr)\n% checks whether a required value to reach has already been reached; in\n% that case flag is set to 0, otherwise it is set to 1\n% Input:\n% f\tfunction value to be checked\n% vtr\tvalue to reach\n% Output:\n% flag\t= 0  vtr has been reached\n%\t= 1  otherwise\n\nfunction flag = chvtr(f,vtr)\nif f <= vtr\n  flag = 0;\nelse\n  flag = 1;\nend\n", "meta": {"author": "lacerbi", "repo": "optimviz", "sha": "2cc41c19ffeaaa9a23239f53d80691cf3599357d", "save_path": "github-repos/MATLAB/lacerbi-optimviz", "path": "github-repos/MATLAB/lacerbi-optimviz/optimviz-2cc41c19ffeaaa9a23239f53d80691cf3599357d/utils/mcs/private/chvtr.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.4493926344647597, "lm_q2_score": 0.12085323882332895, "lm_q1q2_score": 0.05431055537841457}}
{"text": "function title = p04_title ( )\n\n%*****************************************************************************80\n%\n%% P04_TITLE returns a title for problem 04.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    12 April 2009\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Reference:\n%\n%    Per-Olof Persson and Gilbert Strang,\n%    A Simple Mesh Generator in MATLAB,\n%    SIAM Review,\n%    Volume 46, Number 2, June 2004, pages 329-345.\n%\n%  Parameters:\n%\n%    Output, string TITLE, a title for the problem.\n%\n  title = '#4: The unit hexagon with hexagonal hole.';\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_triangulation/p04_title.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.4610167941228965, "lm_q2_score": 0.11757213199952936, "lm_q1q2_score": 0.054202727372617034}}
{"text": "function [ a, b ] = p25_lim ( )\n\n%*****************************************************************************80\n%\n%% P25_LIM returns the integration limits for problem 25.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    04 November 2009\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real A, B, the limits of integration.\n%\n  a = 0.0;\n  b = 1.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_int/p25_lim.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.35936414516010196, "lm_q2_score": 0.15002883194322006, "lm_q1q2_score": 0.053914982940643875}}
{"text": "function [ a, b ] = p22_lim ( )\n\n%*****************************************************************************80\n%\n%% P22_LIM returns the integration limits for problem 22.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    04 November 2009\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real A, B, the limits of integration.\n%\n  a = 0.0;\n  b = 1.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_int/p22_lim.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.3738758227716966, "lm_q2_score": 0.14414886038616342, "lm_q1q2_score": 0.05389377377847927}}
{"text": "function [ a, b ] = p44_lim ( )\n\n%*****************************************************************************80\n%\n%% P44_LIM returns the integration limits for problem 44.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    04 November 2009\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real A, B, the limits of integration.\n%\n  a = 0.0;\n  b = 1.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_int/p44_lim.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.37387583672470853, "lm_q2_score": 0.14414885119438492, "lm_q1q2_score": 0.053893772353206165}}
{"text": "function plotData(X, y)\n%PLOTDATA Plots the data points X and y into a new figure \n%   PLOTDATA(x,y) plots the data points with + for the positive examples\n%   and o for the negative examples. X is assumed to be a Mx2 matrix.\n\n% Create New Figure\nfigure; hold on;\n\n% ====================== YOUR CODE HERE ======================\n% Instructions: Plot the positive and negative examples on a\n%               2D plot, using the option 'k+' for the positive\n%               examples and 'ko' for the negative examples.\n%\n\n\n\n\n\n\n\n\n\n% =========================================================================\n\n\n\nhold off;\n\nend\n", "meta": {"author": "Ayatans", "repo": "Machine-Learning-homework", "sha": "4550cfc0426c9da8072dff165130fff40d138c10", "save_path": "github-repos/MATLAB/Ayatans-Machine-Learning-homework", "path": "github-repos/MATLAB/Ayatans-Machine-Learning-homework/Machine-Learning-homework-4550cfc0426c9da8072dff165130fff40d138c10/machine-learning-ex2/ex2/plotData.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.46879062662624377, "lm_q2_score": 0.11436853825632723, "lm_q1q2_score": 0.05361489871551117}}
{"text": "function [version_num, version_name, version_date] = check_matlab_version()\n% [version_num, version_name, version_date] = check_matlab_version()\n%\n% version_date will be in datenum format\n% Compare to a date like this: version_date > datenum('01-Jan-2016')\n%\n% [version_num, version_name, version_date] = check_matlab_version;\n% if version_date > datenum('01-Jan-2016'), disp('You are running matlab 2016 or later!'), else, disp('old version!'), end\n\nwhich_ver = ver('matlab');\n\nversion_num = str2double(which_ver.Version);\n\nversion_name = which_ver.Release;\n\nversion_date = datenum(which_ver.Date);\n\n\nend\n\n", "meta": {"author": "canlab", "repo": "CanlabCore", "sha": "af242e120f0480c4feaeea90471c015a14f1f60e", "save_path": "github-repos/MATLAB/canlab-CanlabCore", "path": "github-repos/MATLAB/canlab-CanlabCore/CanlabCore-af242e120f0480c4feaeea90471c015a14f1f60e/CanlabCore/Misc_utilities/check_matlab_version.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.40733341443526055, "lm_q2_score": 0.1311732169688646, "lm_q1q2_score": 0.05343123435038488}}
{"text": "function [ a, b ] = p39_lim ( )\n\n%*****************************************************************************80\n%\n%% P39_LIM returns the integration limits for problem 39.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    04 November 2009\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real A, B, the limits of integration.\n%\n  a = 0.0;\n  b = 1.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_int/p39_lim.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.37022539259558657, "lm_q2_score": 0.14414884567931804, "lm_q1q2_score": 0.053367562983826146}}
{"text": "function value = r4_sign ( x )\n\n%*****************************************************************************80\n%\n%% R4_SIGN returns the sign of an R4.\n%\n%  Discussion:\n%\n%    The value is +1 if the number is positive or zero, and it is -1 otherwise.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    28 September 2014\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Input, real X, the number whose sign is desired.\n%\n%    Output, real VALUE, the sign of X.\n%\n  if ( x < 0.0 )\n    value = -1.0;\n  else\n    value = +1.0;\n  end\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/r4lib/r4_sign.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.3775406687981454, "lm_q2_score": 0.14033625488320034, "lm_q1q2_score": 0.05298264352523045}}
{"text": "function title = p01_title ( )\n\n%*****************************************************************************80\n%\n%% P01_TITLE returns a title for problem 01.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    12 April 2009\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Reference:\n%\n%    Per-Olof Persson and Gilbert Strang,\n%    A Simple Mesh Generator in MATLAB,\n%    SIAM Review,\n%    Volume 46, Number 2, June 2004, pages 329-345.\n%\n%  Parameters:\n%\n%    Output, string TITLE, a title for the problem.\n%\n  title = '#1: The unit circle.';\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_triangulation/p01_title.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.39233683016710835, "lm_q2_score": 0.134775927848826, "lm_q1q2_score": 0.0528775603150393}}
{"text": "function value = r8mat_nonzeros ( m, n, a )\n\n%*****************************************************************************80\n%\n%% R8MAT_NONZEROS counts the nonzeros in an R8MAT.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    31 August 2014\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Input, integer M, N, the number of rows and columns.\n%\n%    Input, real A(M,N), the matrix.\n%\n%    Output, integer VALUE, the number of nonzeros.\n%\n  value = length ( find ( a ) );\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/r8lib/r8mat_nonzeros.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.5, "lm_q2_score": 0.10521054792560196, "lm_q1q2_score": 0.05260527396280098}}
{"text": "%% Copyright (C) 2015, 2016 Colin B. Macdonald\n%%\n%% This file is part of OctSymPy.\n%%\n%% OctSymPy is free software; you can redistribute it and/or modify\n%% it under the terms of the GNU General Public License as published\n%% by the Free Software Foundation; either version 3 of the License,\n%% or (at your option) any later version.\n%%\n%% This software is distributed in the hope that it will be useful,\n%% but WITHOUT ANY WARRANTY; without even the implied warranty\n%% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See\n%% the GNU General Public License for more details.\n%%\n%% You should have received a copy of the GNU General Public\n%% License along with this software; see the file COPYING.\n%% If not, see <http://www.gnu.org/licenses/>.\n\n%% -*- texinfo -*-\n%% @documentencoding UTF-8\n%% @defmethod @@symfun formula (@var{f})\n%% Return a symbolic expression for this symfun.\n%%\n%% This returns the expression that defines the function given by\n%% the symfun @var{f}.  Typically this is the RHS of the symfun:\n%% @example\n%% @group\n%% syms x\n%% f(x) = sin(x);\n%% formula(f)\n%%   @result{} ans = (sym) sin(x)\n%% @end group\n%% @end example\n%%\n%% The command @ref{@@symfun/argname} gives the independent variables\n%% of the @@symfun.  Basically, @code{argname} for the independent\n%% variables and @code{formula} for the dependent expression.\n%%\n%% If the symfun @var{f} is abstract, this returns @var{f} as a\n%% sym:\n%% @example\n%% @group\n%% syms f(x)\n%% formula(f)   % but note it's a sym\n%%   @result{} ans = (sym) f(x)\n%% @end group\n%% @end example\n%%\n%% @seealso{@@symfun/argnames}\n%% @end defmethod\n\nfunction g = formula(f)\n  g = f.sym;\nend\n\n\n%!test\n%! % simple\n%! syms x\n%! f(x) = sin(x);\n%! g = formula(f);\n%! assert (isequal (g, sin(x)));\n\n%!test\n%! % concrete: return is a sym, not a symfun\n%! syms x\n%! f(x) = sin(x);\n%! g = formula(f);\n%! assert (~isa(g, 'symfun'));\n\n%!test\n%! % abstract: return is a sym, not a symfun\n%! syms f(x)\n%! g = formula(f);\n%! assert (~isa(g, 'symfun'));\n", "meta": {"author": "cbm755", "repo": "octsympy", "sha": "c1ecd1e08f027d5101d0f4250dfc496aa98c8bcd", "save_path": "github-repos/MATLAB/cbm755-octsympy", "path": "github-repos/MATLAB/cbm755-octsympy/octsympy-c1ecd1e08f027d5101d0f4250dfc496aa98c8bcd/inst/@symfun/formula.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.5, "lm_q2_score": 0.1052105458213802, "lm_q1q2_score": 0.0526052729106901}}
{"text": "function [ node_num, tetra_num ] = tet_mesh_order10_example_size ( )\n\n%*****************************************************************************80\n%\n%% TET_MESH_ORDER10_EXAMPLE_SIZE sizes an example quadratic tet mesh.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    03 August 2009\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, integer NODE_NUM, the number of nodes.\n%\n%    Output, integer TETRA_NUM, the number of tetrahedrons.\n%\n  node_num = 27;\n  tetra_num = 6;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/tet_mesh/tet_mesh_order10_example_size.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.5, "lm_q2_score": 0.10521053880730794, "lm_q1q2_score": 0.05260526940365397}}
{"text": "function test_suite = testBadSinTest\ninitTestSuite;\n\nfunction testSinPi\n% Example of a failing test case.  The test writer should have used\n% assertAlmostEqual here.\nassertEqual(sin(pi), 0);\n", "meta": {"author": "ricedsp", "repo": "D-AMP_Toolbox", "sha": "6e597d98c84755697b65554d59485d50a549c01a", "save_path": "github-repos/MATLAB/ricedsp-D-AMP_Toolbox", "path": "github-repos/MATLAB/ricedsp-D-AMP_Toolbox/D-AMP_Toolbox-6e597d98c84755697b65554d59485d50a549c01a/Packages/rwt/tests/matlab_xunit/doc/examples_general/testBadSinTest.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.49218813572079556, "lm_q2_score": 0.10669060175672707, "lm_q1q2_score": 0.052511848377573334}}
{"text": "function [ a, b ] = p57_lim ( )\n\n%*****************************************************************************80\n%\n%% P57_LIM returns the integration limits for problem 57.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    04 November 2009\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real A, B, the limits of integration.\n%\n  a = 0.0;\n  b = 1.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_int/p57_lim.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.35936413143782797, "lm_q2_score": 0.14608725076600917, "lm_q1q2_score": 0.052498517985667056}}
{"text": "function AddedPath = requireFEXpackage(FEXSubmissionID)\n%Function requireFEXpackage - \n%installs Matlab Central File Exchange (FEX) submission \n%with given ID into the directory chosen by the user.\n%A new FEX submissions may use previous FEX submissions as its part.\n%The function 'requireFEXpackage' helps in adding those previous\n%submissions to the user's MATLAB installation. \n%\n%This function is a part of File Exchange submission 31069. \n%Download the entire submission:\n%http://www.mathworks.com/matlabcentral/fileexchange/31069\n%\n% SYNTAX: \n%    AddedPath = requireFEXpackage(FEXSubmissionID)\n%\n% INPUT: \n%    ID of the required submission to File Exchange \n%\n% OUTPUT: \n%    the path to that submission added to the user's MATLAB path.\n%\n% HOW TO CALL:\n%    The command \n%           P = requireFEXpackage(8277)\n%    will download and install the package with ID 8277 \n%    (namely, nice 'fminsearchbnd' by John D'Errico)\n%\n% EXAMPLES -- HOW TO USE:\n%\n% EXAMPLE 1 (using 'exist' command):\n%\n%     % first, somewhere in the very beginning of your code,\n%     % check if the function 'fminsearchbnd' from the FEX package 8277 \n%     % is on your MATLAB path, and if it is not there, \n%     % require the FEX package 8277:\n%     if ~(exist('fminsearchbnd', 'file') == 2)\n%         P = requireFEXpackage(8277);  % fminsearchbnd is part of 8277\n%     end\n% \n%     % Then just use 'fminsearchbnd' where you need it:\n%     syms x\n%     RosenbrockBananaFunction = @(x) (1-x(1)).^2 + 100*(x(2)-x(1).^2).^2;\n%     x = fminsearchbnd(RosenbrockBananaFunction,[3 3])\n\n% EXAMPLE 2 (using 'try-catch' command):\n%\n%     syms x\n%     RosenbrockBananaFunction = @(x) (1-x(1)).^2+100*(x(2)-x(1).^2).^2;\n%     try \n%        % if function 'fminsearchbnd' already exists in your MATLAB\n%        % installation, just use it:\n%        x = fminsearchbnd(RosenbrockBananaFunction,[3 3])\n%     catch \n%        % if function 'fminsearchbnd' is not present in your MATLAB\n%        % installation, first get the package 8277 (to which it belongs) \n%        % from the MATLAB Central File Exchange (FEX)\n%        P = requireFEXpackage(8277);  % fminsearchbnd is part of 8277\n%        % and then use that function:\n%        x = fminsearchbnd(RosenbrockBananaFunction,[3 3])\n%     end\n% \n%\n% NOTE: on Mac platform, the title of the dialog box for \n% choosing the directory for installing the required FEX package \n% is not shown; this is not a bug, this is how UIGETDIR works on Macs --  \n% see the documentation for UIGETDIR\n% http://www.mathworks.com/help/techdoc/ref/uigetdir.html\n%\n% (C) Igor Podlubny, 2011\n\n\nID = num2str(FEXSubmissionID);\n\n% Ask user for the confirmation of the installation\n% of the required FEX package\nyes = ['YES, Install package ' ID];\nno = 'NO, do not install';\nuserchoice = questdlg(['The Matlab function/toolbox, which you are running, ' ... \n    'requires the presence of the package ' ID ... \n    ' from Matlab Central File Exchange.' ...\n    'Would you like to install the FEX package ' ID ' now?'] , ...\n\t['Required package ' ID], ...\n\tyes, no, yes);\n\n% Handle response\nswitch userchoice\n    case yes,\n        install = 1;\t\t\t\n    case no,\n        install = 0;\n    otherwise,\n        install = 0;\nend\n\n\nif install == 1\n    baseURL = 'http://www.mathworks.com/matlabcentral/fileexchange/';\n    query = '?download=true';\n\n    location = uigetdir(pwd, ['Select the directory for installing the required FEX package' ID ]);\n    if location ~= 0\n        % download package 'ID' from Matlab Central File Exchange\n        filetosave = [location filesep ID '.zip'];\n        FEXpackage = [baseURL ID query];\n        [f,status] = urlwrite(FEXpackage,filetosave);\n        if status==0 \n            warndlg(['No connection to Matlab Central File Exchange,' ' or package ' ID ' does not exist.' ... \n                ' Package ' ID ' has not been installed. ' ...\n                ' Check you internet settings and the ID of the required package, and try again. '] , ...\n                ['No connection to Matlab Central File Exchange' ' or package ' ID ' does not exist'], ...\n                'modal');\n            AddedPath = '';            \n            return\n        end\n        % unzip the downloaded file to the subdirectory 'ID'\n        todir = [location filesep ID];\n        % if the directory 'ID' doesn't exist at given location, create it\n        if ~(exist([location filesep ID], 'dir') == 7)\n            mkdir(location, ID);\n        end\n        try \n            unzip(filetosave, todir);\n            % after unzipping, delete the downloaded ZIP file\n            delete(filetosave);\n            % prepend the paths to the downloaded package to the MATLAB path\n            P = genpath([location filesep ID]);\n            path(P,path);\n        catch\n            % if the FEX package is not ZIP, then it is a single m-file\n            % just move the file to the ID directory\n            [pathstr, name, ext] = fileparts(filetosave);\n            movefile(filetosave, [todir filesep name '.m']);\n            P = genpath([location filesep ID]);\n            path(P,path);\n        end\n    else\n        P = '';\n    end\n\n    AddedPath = P; \nelse\n    AddedPath = '';\nend\n\n\nif install == 1,\n    % Ask user about reviewing and saving the modified MATLAB path, \n    % and take him to PATHTOOL, if the user wants to save the modified path\n    yes = 'YES, I want to review and save the MATLAB path';\n    no = 'NO, I don''t want to save the path permanently';\n    userchoice = questdlg(['After adding the package ' ID ... \n        ' from Matlab Central File Exchange to your MATLAB installation,' ...\n        ' the MATLAB path has been modified accordingly. ', ...\n        'Would you like to review and save the modified MATLAB path?'] , ...\n        'Review and save the modified MATLAB path for future use?', ...\n        yes, no, yes);\n    \n    % Handle response\n    switch userchoice\n        case yes,\n            pathtool;\t\t\t\n        case no,\n        otherwise,\n    end\nend\n\n\n\n", "meta": {"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/32170-fitting-data-using-the-mittag-leffler-function/requireFEXpackage.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.33111973962899144, "lm_q2_score": 0.1581743507642642, "lm_q1q2_score": 0.05237464984104792}}
{"text": "% Chapter 11: Interior-point methods\n%\n%  log_utility_flow.m - Section 11.8.4: Network rate optimization\nhelp Contents\n", "meta": {"author": "cvxr", "repo": "CVX", "sha": "a7b46e7840c3ccf3f35df374d2ff3da4eaafc3cd", "save_path": "github-repos/MATLAB/cvxr-CVX", "path": "github-repos/MATLAB/cvxr-CVX/CVX-a7b46e7840c3ccf3f35df374d2ff3da4eaafc3cd/examples/cvxbook/Ch11_intpt_methods/Contents.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.49609382947091946, "lm_q2_score": 0.10521052828620034, "lm_q1q2_score": 0.05219429387815962}}
{"text": "function r8_min_test ( )\n\n%*****************************************************************************80\n%\n%% R8_MIN_TEST tests R8_MIN.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    10 March 2015\n%\n%  Author:\n%\n%    John Burkardt\n%\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, 'R8_MIN_TEST\\n' );\n  fprintf ( 1, '  R8_MIN returns the minimum of two R8''s.\\n' );\n\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, '       A       B      C=R8_MIN(A,B)\\n' );\n  fprintf ( 1, '\\n' );\n\n  r8_lo = -5.0;\n  r8_hi = +5.0;\n  seed = 123456789;\n  for i = 1 : 10\n    [ a, seed ] = r8_uniform_ab ( r8_lo, r8_hi, seed );\n    [ b, seed ] = r8_uniform_ab ( r8_lo, r8_hi, seed );\n    c = r8_min ( a, b );\n    fprintf ( 1, '  %8.4f  %8.4f  %8.4f\\n', a, b, c );\n  end\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/r8lib/r8_min_test.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.4378234991142019, "lm_q2_score": 0.11920291419948607, "lm_q1q2_score": 0.052189836999428973}}
{"text": "function r8vec_print ( n, a, title )\n\n%*****************************************************************************80\n%\n%% R8VEC_PRINT prints an R8VEC.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license. \n%\n%  Modified:\n%\n%    25 January 2004\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Input, integer N, the dimension of the vector.\n%\n%    Input, real A(N), the vector to be printed.\n%\n%    Input, string TITLE, a title to be printed first.\n%    TITLE may be blank.\n%\n  if ( 0 < s_len_trim ( title ) )\n    fprintf ( 1, '\\n' );\n    fprintf ( 1, '%s\\n', title );\n  end\n\n  fprintf ( 1, '\\n' );\n  for i = 1 : n\n    fprintf ( 1, '%6d  %12f\\n', i, a(i) );\n  end\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/stroud/r8vec_print.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.42250463481418826, "lm_q2_score": 0.12252321572224491, "lm_q1q2_score": 0.0517666265149871}}
{"text": "function value = r8_abs ( x )\n\n%*****************************************************************************80\n%\n%% R8_ABS returns the absolute value of an R8.\n%\n%  Discussion:\n%\n%    An R8 is a double precision real value.\n%\n%    MATLAB supplies the ABS function, which should be used instead\n%    of this function.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    06 September 2005\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Input, real X, the number whose absolute value is desired.\n%\n%    Output, real R8_ABS, the absolute value of X.\n%\n  if ( 0.0 <= x )\n    value = + x;\n  else\n    value = - x;\n  end\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/blas0/r8_abs.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.4649015713733885, "lm_q2_score": 0.11124120503431591, "lm_q1q2_score": 0.05171621102192276}}
{"text": "function range = p06_range ( )\n\n%*****************************************************************************80\n%\n%% P06_RANGE returns an interval bounding the root for problem 6.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    06 May 2011\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real RANGE(2), the minimum and maximum values of\n%    an interval containing the root.\n%\n  range(1) =  0.00001;\n  range(2) = 20.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_zero/p06_range.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.4378234991142019, "lm_q2_score": 0.11757213354550883, "lm_q1q2_score": 0.05147584290721691}}
{"text": "function n = p15_n ( )\n\n%*****************************************************************************80\n%\n%% P15_N returns the number of variables for problem 15.\n%\n%  Discussion:\n%\n%    The number of variables may be any multiple of 4.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    16 March 2000\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, integer N.  If N is positive, N represents the\n%    only legal value for N for this problem.  If N is\n%    negative, the absolute value of N is the least legal\n%    value of N, but other values are allowable.\n%\n  n = - 4;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_opt/p15_n.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.36658973632215985, "lm_q2_score": 0.1403362494900832, "lm_q1q2_score": 0.051445828697010434}}
{"text": "function T = myreshape(T, sizes)\n% MYRESHAPE Like the built-in reshape, except myreshape(T,n) == reshape(T,[n 1])\n% T = myreshape(T, sizes)\n\nif length(sizes)==0\n  return;\nelseif length(sizes)==1\n  T = reshape(T, [sizes 1]);\nelse\n  T = reshape(T, sizes(:)');\nend\n", "meta": {"author": "fieldtrip", "repo": "fieldtrip", "sha": "c2039be598a02d86b39aae76bfa7aaa720f9801c", "save_path": "github-repos/MATLAB/fieldtrip-fieldtrip", "path": "github-repos/MATLAB/fieldtrip-fieldtrip/fieldtrip-c2039be598a02d86b39aae76bfa7aaa720f9801c/external/dmlt/external/murphy/KPMtools/myreshape.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.4882833952958347, "lm_q2_score": 0.10521054441856573, "lm_q1q2_score": 0.0513725618496205}}
{"text": "function value = r8_sign ( x )\n\n%*****************************************************************************80\n%\n%% R8_SIGN returns the sign of an R8.\n%\n%  Discussion:\n%\n%    The value is +1 if the number is positive or zero, and it is -1 otherwise.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    21 March 2004\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Input, real X, the number whose sign is desired.\n%\n%    Output, real VALUE, the sign of X.\n%\n  if ( x < 0.0 )\n    value = -1.0;\n  else\n    value = 1.0;\n  end\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/r8lib/r8_sign.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.38491214448393346, "lm_q2_score": 0.1329642264548166, "lm_q1q2_score": 0.05117954554437081}}
{"text": "function chrpak_test001 ( )\n\n%*****************************************************************************80\n%\n%% TEST001 tests A_TO_I4 and I4_TO_A.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    14 January 2007\n%\n%  Author:\n%\n%    John Burkardt\n%\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, 'TEST001\\n' );\n  fprintf ( 1, '  A_TO_I4: Alphabetic character => I\\n' );\n  fprintf ( 1, '  I4_TO_A: I => Alphabetic character\\n' );\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, '  1:26 = A:Z\\n' );\n  fprintf ( 1, '  27:52 = a:z\\n' );\n  fprintf ( 1, '\\n' );\n  fprintf ( 1, '   I  ==>  A  ==>  I\\n' );\n  fprintf ( 1, '\\n' );\n\n  for i4 = 0 : 3 : 55\n \n    a = i4_to_a ( i4 );\n    j4 = a_to_i4 ( a );\n\n    fprintf ( 1, '  %8d  \"%c\"  %8d\\n', i4, a, j4 );\n \n  end\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/chrpak/chrpak_test001.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.4726834766204328, "lm_q2_score": 0.10818895024889486, "lm_q1q2_score": 0.05113912913556266}}
{"text": "% Copyright (C) Daphne Koller, Stanford University, 2012\n\nfunction DecodedMarginalsToChars(decodedMarginals)\n    chars = 'abcdefghijklmnopqrstuvwxyz';\n    fprintf('%c', chars(decodedMarginals));\n    fprintf('\\n');\nend\n", "meta": {"author": "anhncs", "repo": "Probabilistic-Graphical-Models", "sha": "7fd4ef255db59ecbfe1a134cadbc4be5ca839894", "save_path": "github-repos/MATLAB/anhncs-Probabilistic-Graphical-Models", "path": "github-repos/MATLAB/anhncs-Probabilistic-Graphical-Models/Probabilistic-Graphical-Models-7fd4ef255db59ecbfe1a134cadbc4be5ca839894/4.Exact Inference/DecodedMarginalsToChars.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.4843800842769843, "lm_q2_score": 0.10521053389745763, "lm_q1q2_score": 0.05096188727607704}}
{"text": "function s = yjf_to_s_julian ( y, j, f )\n\n%*****************************************************************************80\n%\n%% YJF_TO_S_JULIAN writes a Julian YJF date into a string.\n%\n%  Format:\n%\n%    AD YYYY/JJJ.FF\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    19 April 2013\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Input, integer Y, J, real F, the YJF date.\n%\n%    Output, string S, the representation of the date.\n%\n  if ( y < 0 )\n    s = sprintf ( 'BC %d/%06.2f', -y, j + f );\n  else\n    s = sprintf ( 'AD %d/%06.2f', y, j + f );\n  end\n\n  return\nend", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/calpak/yjf_to_s_julian.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.48438008427698437, "lm_q2_score": 0.1052105289876075, "lm_q1q2_score": 0.050961884897843424}}
{"text": "function h = bc_test01 ( x_num, x, t, h )\n\n%*****************************************************************************80\n%\n%% BC_TEST01 evaluates the boundary conditions for problem 1.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license. \n%\n%  Modified:\n%\n%    25 January 2012\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Input, integer X_NUM, the number of nodes.\n%\n%    Input, real X(X_NUM,1), the node coordinates.\n%\n%    Input, real T, the current time.\n%\n%    Input, real H(X_NUM,1), the current heat values.\n%\n%    Output, real H(X_NUM,1), the current heat values, after boundary\n%    conditions have been imposed.\n%\n  h(1,1)     = 90.0;\n  h(x_num,1) = 70.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/fd1d_heat_explicit/bc_test01.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.41869692386284973, "lm_q2_score": 0.12085324198975818, "lm_q1q2_score": 0.050600880659964334}}
{"text": "function scan_data = dk8rd(ufilename,plotmode,verbose)\n%DK8RD - load Dektak 8 surface profilometer data file\n%\n% SCAN_DATA = DK8RD(UFILENAME,PLOTMODE,VERBOSE)\n%\n%DK8RD reads the data from file UFILENAME.txt, and and returns a 2-column\n% array SCAN_dATA:\n%  (:,1) is the horizontal position data in microns\n%  (:,2) is the vertical profile data in microns\n%\n% Options:\n% If VERBOSE == 0, no messages will be displayed.\n% If VERBOSE == 1, the data summary will be displayed. (default)\n% If VERBOSE == 2, the file header and data summary will be displayed.\n% If PLOTMODE == 0, the data will not be displayed.\n% if PLOTMODE == 1, the data will be displayed in a new figure. (default)\n%\n% NOTE: The function can only read ASCII text data files, not binary data\n%  files. If you supply a filename without an extension, the extension\n%  \".txt\" is appended.\n%\n% Examples:\n%\n%  If the data is stored in a text file called \"mydata.txt\", then:\n%\n%      dk8rd mydata;\n%\n%  will load the file, plot the data, and print a summary. You can also use:\n%\n%      dk8rd;\n%\n%  and you will be prompted for the file name. The command:\n%\n%      profile_data=dk8rd('mydata',0,1);\n%\n%  will open the file mydata.txt, plot the data,\n%   and save the data to the variable profile_data in the workspace\n%   without printing anything in the command window. \n%\n%\n% M.A. Hopcroft\n%  mhopeng at gmail dot com\n%\n% The license governing use of this code is in the accompanying file\n%  \"license.txt\".\n%\nversionstr='dk8rd 1.3';\n\n% MH Jul2013\n% v1.3  add uifileget\n% MH Sep2012\n% v1.2  updates for modern matlab\n% MH MAY2007\n% v1.1  re-order input (verbose last)\n%       filename w/ or w/o .txt\n% MH OCT2006\n% v1.0 out of beta\n%\n%#ok<*NBRAK>\n\n% handle input arguments - set defaults\n% default to verbose mode 1 (summary only)\nif nargin < 3\n    verbose = 1;\nend\n\n% default to plot mode 1\nif nargin < 2\n    plotmode = 1;\nend\n\n% get interactive if not being called by another program\nif (nargout == 0)\n    if (verbose >= 1 && nargin == 0)\n        clc;\n        fprintf(1, '\\n\\n  %s\\n  %s\\n\\n', versionstr, 'Load Dektak 8 data files');\n    end\nend\n\n\n%%%%\n% open user's file\nif nargin >= 1 % if the user already specified a file, use it\n    userfilename=ufilename;\n    \n    % check to see if file exists\n    cfid=fopen(userfilename);\n    if cfid== -1\n        % try with \".txt\"\n        userfilename=strcat(userfilename,'.txt');\n        cfid=fopen(userfilename);\n        if cfid== -1\n            disp(pwd);\n            fprintf(1,'ERROR: data file [\"%s\"] not found in current directory',userfilename);\n            scan_data=[];\n            return\n        end\n        fclose(cfid);\n    end\n    \nelse % if user did not specify the file name, ask for one\n    [ufilename, ufilepath]=uigetfile('.txt','Select the Dektak 8 data file');\n    if isequal(ufilename,0)\n        scan_data=[];\n        return\n    end\n    userfilename=fullfile(ufilepath,ufilename);\n    %userfilename=input(' Enter the name of the Dektak 8 .txt file: ','s');\nend\n\n% open the file\nuserfile=fopen(userfilename);\n[fpath, fname, fext]=fileparts(userfilename);\n\n\n%%%%\n% process the file header\n% the first 44 lines are header information\n%  read them in and get some data: scan length, number of points, etc.\n% display the header for plotmode 2 only\n% note the the Dektak 8 file format is very similar to the Dektak 3\nif verbose == 2\n    fprintf(1,'\\n\\n %s\\n %s %s\\n\\n %s\\n\\n', versionstr, 'Filename:', fname, 'File header:');\nend\n\n% read header lines, if they are useful, save the info\nwhile 1\n    % get the first word on each line and check to see if it is important\n    % the line identifier is followed by a \":\", so break the line into\n    %  two parts based on the :\n    %  if the data is useful, scan it from the second part of the line\n    \n    % get a line from the file\n    linein=fgetl(userfile);\n    % handle spurious carriage returns\n    if isempty(linein), linein=fgetl(userfile); end\n    % figure out where the \":\" is so we can divide the line\n    id_pos=find(linein==':');\n    % some lines may be malformed or empty\n    if ~isempty(id_pos)\n        id_pos=id_pos(1); % some lines have extra :'s\n        % line_id is the identifier\n        line_id=linein(1:id_pos);\n        % line_data is everything following the identifier\n        line_data=linein(id_pos+1:end);\n    else\n        % line_id is the identifier\n        line_id=linein;\n    end\n    \n    % check to see if the line identifier is interesting, if so, scan\n    % the data from line_data. exit when SCALED DATA is reached\n    \n    if strcmp(line_id,'Sclen:')==1\n        scan_length=sscanf(line_data,'%g',1);\n    elseif strcmp(line_id,'Units:')==1\n        headerUnits=sscanf(line_data,'%s',1); % check for unusual \"units\" value\n        if ~strcmpi(headerUnits,'SCI')\n            fprintf(1,'dk8rd: WARNING: Header Units value is \"%s\".\\n  Data is assumed to have units of Angstroms. You should verify this.\\n',headerUnits);\n        end        \n    elseif strcmp(line_id,'NumPts:')==1\n        num_points=sscanf(line_data,'%g',1);\n    elseif strcmp(line_id,'Hsf:')==1\n        stepsize=sscanf(line_data,'%g',1);\n        % note re force- the force output appears to be messed up\n        %  in the data files I have seen, so the input is restricted\n        %  to the first four characters of the line\n    elseif strcmp(line_id,'Force:')==1\n        stylus_force=sscanf(line_data(1:4),'%d',1);\n    elseif strcmp(line_id,'Date:')==1\n        scan_date=sscanf(line_data,'%s',1);\n        scan_time=sscanf(line_data,'%*s %s',1);\n    elseif strcmp(line_id,'Tspeed:')==1\n        scan_speed=sscanf(line_data,'%s',1);\n    elseif strcmp(line_id,'SCALED DATA:')==1\n        break % exit loop\n    end\n    \n    \n    % print the line to the command window if verbose mode 2 is set\n    if verbose == 2\n        % avoid printing empty lines\n        if ~isempty(linein)\n            fprintf(1,'%s\\n',linein);\n        end\n    end\nend\n\n% % the position of the data points is now known\n% stepsize=scan_length/num_points;\n% % if horiz_res ~= stepsize, error('error reading file: horiz_res ~= stepsize'); end\n% scan_data(:,1)=[stepsize:stepsize:scan_length]';\n\n\n%%%%\n% get data from file\n%  data is a simple list of vertical position in Angstroms\n%   (formatted in 5 columns of text)\n\n% create the x axis\nscan_data(:,1)=[stepsize:stepsize:scan_length]';\n\n% read the data points\n[scan_data(:,2),count]=fscanf(userfile,'%f',inf);\nif count~=num_points\n    fprintf(1,'dk8rd: WARNING: The number of data points (%g) does not equal the value in the file header (%g).\\n  The file may be corrupted.',...\n        count,num_points);\nend\n% scale data to um from Angstroms\nscan_data(:,2)=scan_data(:,2)./10000;\n\n\n% close the file\nfclose(userfile);\n\n\n% plot\nif plotmode == 1\n    \n    figure;\n    plot(scan_data(:,1),scan_data(:,2),'.-');\n    title(['dk8rd: ' fname],'Interpreter','none','FontSize',16,'FontWeight','bold');\n    xlabel('Scan Length (\\mum)','FontSize',14);\n    ylabel('Profile (\\mum)','FontSize',14);\n    grid on;\n    \nend\n\n\n% print summary data for the user\nif verbose >= 1\n    \n    fprintf(1,'\\n');\n    fprintf(1,' %s\\n', 'Data Summary:');\n    fprintf(1,'\\n');\n    fprintf(1,' %s %s\\n', 'File name:', [fname fext]);\n    fprintf(1,' %s %s %s\\n','Scan Date:',scan_date,scan_time);\n    \n    fprintf(1,'\\n');\n    \n    fprintf(1,' %s %s\\n', 'Scan Speed:', scan_speed);\n    fprintf(1,' %s %d\\n', 'Number of data points read:', count);\n    fprintf(1,' %s %d %s\\n', 'Scan Length:', scan_length, 'um');\n    fprintf(1,' %s %g %s\\n', 'Scan Step:', stepsize, 'um');\n    fprintf(1,' %s %g %s\\n', 'Nominal Stylus Force:', stylus_force, 'mg');\n    fprintf(1,'   %s\\n', '[Note: stylus force is incorrectly reported by beta versions of Dektak 8 software]'); \n    \n    fprintf(1,'\\n');\n    \nend\n\n\n", "meta": {"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/15096-rd-scripts/rd_scripts_v13/dk8rd.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.4073334144352606, "lm_q2_score": 0.12421301159407336, "lm_q1q2_score": 0.050596110129900514}}
{"text": "function [b]=mrow(a)\n\n% function [b]=mrow(a)\n% ------------------------------------------------------------------------\n% This function converts the input matrix (or vector) a to a row vector. \n%\n%\n% Change log: \n% 2023/03/10: Kevin Moerman Created\n%\n% ------------------------------------------------------------------------\n%%\n\nif ismatrix(a)\n    if ~isvector(a) %Check if it is a vector already\n        b=a(:)';\n    else %Vector so either row already or a column\n        if iscolumn(a)\n            b=a'; %Transpose\n        else\n            b=a; %Keep\n        end\n    end\nelse\n    error('Input is not of matrix type. The mrow function is only defined for matrix arrays, see also ismatrix');\nend", "meta": {"author": "gibbonCode", "repo": "GIBBON", "sha": "8178520664a6148db939eaea87e75b3cba4f2b4f", "save_path": "github-repos/MATLAB/gibbonCode-GIBBON", "path": "github-repos/MATLAB/gibbonCode-GIBBON/GIBBON-8178520664a6148db939eaea87e75b3cba4f2b4f/lib/mrow.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.37387582277169656, "lm_q2_score": 0.134775915685312, "lm_q1q2_score": 0.05038945636665483}}
{"text": "function range = p04_range ( )\n\n%*****************************************************************************80\n%\n%% P04_RANGE returns an interval bounding the root for problem 4.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    06 May 2011\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real RANGE(2), the minimum and maximum values of\n%    an interval containing the root.\n%\n  range(1) =  0.00001;\n  range(2) = 20.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_zero/p04_range.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.4339814648038986, "lm_q2_score": 0.11596071672639166, "lm_q1q2_score": 0.0503248017046294}}
{"text": "function range = p09_range ( )\n\n%*****************************************************************************80\n%\n%% P09_RANGE returns an interval bounding the root for problem 9.\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license.\n%\n%  Modified:\n%\n%    06 May 2011\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Output, real RANGE(2), the minimum and maximum values of\n%    an interval containing the root.\n%\n  range(1) = -  5.0;\n  range(2) = + 16.0;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_zero/p09_range.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.4378234991142019, "lm_q2_score": 0.11436852014455552, "lm_q1q2_score": 0.05007322567820238}}
{"text": "function [ x, y, z ] = r8_unswap3 ( x, y, z )\n\n%*****************************************************************************80\n%\n%% R8_UNSWAP3 unswaps three R8's.\n%\n%  Example:\n%\n%    Input:\n%\n%      X = 2, Y = 3, Z = 1\n%\n%    Output:\n%\n%      X = 1, Y = 2, Z = 3\n%\n%  Licensing:\n%\n%    This code is distributed under the GNU LGPL license. \n%\n%  Modified:\n%\n%    20 April 2005\n%\n%  Author:\n%\n%    John Burkardt\n%\n%  Parameters:\n%\n%    Input, real X, Y, Z, three values to be swapped.\n%\n%    Output, real X, Y, Z, the swapped values.\n%\n  w = z;\n  z = y;\n  y = x;\n  x = w;\n\n  return\nend\n", "meta": {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/r8lib/r8_unswap3.m", "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO\n\n", "lm_q1_score": 0.38121956625614994, "lm_q2_score": 0.13117323395124272, "lm_q1q2_score": 0.05000580335130923}}
