一起成长网吧 关注:24贴子:1,356
  • 8回复贴,共1





IP属地:湖南来自Android客户端1楼2022-03-30 22:36回复



    IP属地:湖南2楼2022-04-01 15:56
    回复
      http://www.100bt.com/act/bx-220701/?cuid=691AE9D804FF2D159C19F32FD9D296AF|VOX5K2S22&cuid_galaxy2=691AE9D804FF2D159C19F32FD9D296AF|VOX5K2S22&cuid_gid=&timestamp=1660653232458&_client_version=12.27.1.1


      IP属地:云南来自Android客户端3楼2022-09-09 14:51
      回复
        https://modules.bjtu.edu.cn/course/view.php?id=670


        IP属地:云南来自Android客户端4楼2022-09-09 14:54
        回复
          %% Set the parameters of the simulation
          Cs=1; % this is the initial condition
          T=30; % this is the half-life time (we are making the simulation code general)
          N=60; % this is simulation time (number of simulation steps)
          %% Run the simulation
          a = exp(-log(2)/T); % this is the calculation to find out the proportion left after a year
          % we shall store the results in an array for plotting or further processing
          Cs_sim=zeros(N,1); % the initial array of 60 zeroes
          % now the simulation
          for i=1:N
          Cs=a*Cs; % calculate the new value from the old value (Cs_new=a*Cs_old)
          Cs_sim(i)=Cs; % ... and store the result
          end
          % and plotting:
          plot(Cs_sim)
          % nicer plot
          plot((1:N),Cs_sim,'r-',(1:N),Cs_sim,'b.')
          title(['Radioactive decay: T_{1/2}=' num2str(T)])


          IP属地:云南来自Android客户端5楼2022-09-09 14:57
          回复
            % Script with a few bugs - an example for learning how to use the Matlab
            % debugger on a simple script
            %
            clear
            a=[ 1 2 3 4 5 6];
            b=[11 12 13];
            % check dmensions of these two variables (Workspace window)
            c=a+b;
            plot(c^2)
            title('This is a slightly strange plot')
            xlabel(' .... but never mind')
            rx=randn(50,2);
            % This should generate two columns of random 'data'
            rx(:,2)=rx(:,2)+4;
            % This adds 4 to the second column
            hist(rx');
            % this should generate a pair of histograms
            % in a single graphics window. Check the help
            % system for this command. What is done wrongly
            % here?
            % Can you see the difference between the program running and working?


            IP属地:云南来自Android客户端6楼2022-09-09 14:57
            回复
              % Script with a few bugs - an example for learning how to use the Matlab
              % debugger on a simple script
              %
              clear
              a=[ 1 2 3 4 5 6];
              b=[11 12 13];
              % check dmensions of these two variables (Workspace window)
              c=a+b;
              plot(c^2)
              title('This is a slightly strange plot')
              xlabel(' .... but never mind')
              rx=randn(50,2);
              % This should generate two columns of random 'data'
              rx(:,2)=rx(:,2)+4;
              % This adds 4 to the second column
              hist(rx');
              % this should generate a pair of histograms
              % in a single graphics window. Check the help
              % system for this command. What is done wrongly
              % here?
              % Can you see the difference between the program running and working?


              IP属地:云南来自Android客户端7楼2022-09-09 15:51
              回复
                x = 0:0.01:0.5*pi;
                y1 = sin(x);
                y2 = cos(x);
                y3 = tan(x);
                plot(x,y1,'b',x,y2,'r--',x,y3,'g--')
                title('Combine Plots')
                xlabel('x')
                ylabel('y')
                ylim([0,1])


                IP属地:云南9楼2022-09-22 22:58
                回复
                  IP属地:云南10楼2022-09-22 22:59
                  回复