User Tools

Site Tools


gibson:teaching:fall-2013:math445:hw3solns

====== Differences ====== This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
gibson:teaching:fall-2013:math445:hw3solns [2013/10/22 19:50]
gibson
gibson:teaching:fall-2013:math445:hw3solns [2013/10/22 19:51] (current)
gibson
Line 177: Line 177:
 where //x// and //y// range from -10 to 10. Label the axes. where //x// and //y// range from -10 to 10. Label the axes.
  
-</code>+<​code>​
   N = length(x); ​   N = length(x); ​
   F = zeros(N,N);   F = zeros(N,N);
Line 223: Line 223:
  
 <​code>​ <​code>​
-    ​function f = factorial2(n) +  ​function f = factorial2(n) 
-    % factorial2: compute n! +  % factorial2: compute n! 
  
-      ​f = 1; +    ​f = 1; 
-      while (n>1); +    while (n>1); 
-        f = f*n; +      f = f*n; 
-        n = n-1; +      n = n-1;
-      end+
     end     end
 +  end
 </​code>​ </​code>​
  
gibson/teaching/fall-2013/math445/hw3solns.1382496605.txt.gz · Last modified: 2013/10/22 19:50 by gibson