>> b = 3

b =

     3

>> b

b =

     3

>> b = 3 + sqrt( 3^2 - 1 )

b =

    5.8284

>> format long
>> b

b =

   5.82842712474619

>> sin( b )

ans =

  -0.43924508566302

>> sin( pi )

ans =

    1.224646799147353e-016

>> sin( pi/2 )

ans =

     1

>> exp( sin( pi/4 ) )

ans =

   2.02811498164747

>> pi = 22/7

pi =

   3.14285714285714

>> sin(pi)

ans =

  -0.00126448893038

>> clear
>> pi

ans =

   3.14159265358979

>> b = -8.2 : 0.8 : 3

b =

  Columns 1 through 5 

  -8.20000000000000  -7.40000000000000  -6.60000000000000  -5.80000000000000  -5.00000000000000

  Columns 6 through 10 

  -4.20000000000000  -3.40000000000000  -2.60000000000000  -1.80000000000000  -1.00000000000000

  Columns 11 through 15 

  -0.20000000000000   0.60000000000000   1.40000000000000   2.20000000000000   3.00000000000000

>> b = -8.2 : 0.8 : 2.7

b =

  Columns 1 through 5 

  -8.20000000000000  -7.40000000000000  -6.60000000000000  -5.80000000000000  -5.00000000000000

  Columns 6 through 10 

  -4.20000000000000  -3.40000000000000  -2.60000000000000  -1.80000000000000  -1.00000000000000

  Columns 11 through 14 

  -0.20000000000000   0.60000000000000   1.40000000000000   2.20000000000000

>> b = linspace( -8.2, 3, 18 )

b =

  Columns 1 through 5 

  -8.20000000000000  -7.54117647058823  -6.88235294117647  -6.22352941176471  -5.56470588235294

  Columns 6 through 10 

  -4.90588235294118  -4.24705882352941  -3.58823529411765  -2.92941176470588  -2.27058823529412

  Columns 11 through 15 

  -1.61176470588235  -0.95294117647059  -0.29411764705882   0.36470588235294   1.02352941176471

  Columns 16 through 18 

   1.68235294117647   2.34117647058824   3.00000000000000

>> b + b

ans =

  Columns 1 through 5 

 -16.40000000000000 -15.08235294117647 -13.76470588235294 -12.44705882352941 -11.12941176470588

  Columns 6 through 10 

  -9.81176470588235  -8.49411764705882  -7.17647058823529  -5.85882352941176  -4.54117647058823

  Columns 11 through 15 

  -3.22352941176471  -1.90588235294118  -0.58823529411765   0.72941176470588   2.04705882352941

  Columns 16 through 18 

   3.36470588235294   4.68235294117647   6.00000000000000

>> b*b
??? Error using ==> *
Inner matrix dimensions must agree.

>> b .* b

ans =

  Columns 1 through 5 

  67.24000000000000  56.86934256055362  47.36678200692041  38.73231833910034  30.96595155709342

  Columns 6 through 10 

  24.06768166089965  18.03750865051903  12.87543252595155   8.58145328719723   5.15557093425605

  Columns 11 through 15 

   2.59778546712803   0.90809688581315   0.08650519031142   0.13301038062284   1.04761245674740

  Columns 16 through 18 

   2.83031141868512   5.48110726643599   9.00000000000000

>> b .^ 2

ans =

  Columns 1 through 5 

  67.24000000000000  56.86934256055362  47.36678200692041  38.73231833910034  30.96595155709342

  Columns 6 through 10 

  24.06768166089965  18.03750865051903  12.87543252595155   8.58145328719723   5.15557093425605

  Columns 11 through 15 

   2.59778546712803   0.90809688581315   0.08650519031142   0.13301038062284   1.04761245674740

  Columns 16 through 18 

   2.83031141868512   5.48110726643599   9.00000000000000

>> b .^ 3

ans =

  1.0e+002 *

  Columns 1 through 5 

  -5.51368000000000  -4.28861748015469  -3.25994911459393  -2.41051722369224  -1.72316412782414

  Columns 6 through 10 

  -1.18073214736414  -0.76606360268675  -0.46200081416650  -0.25138610217790  -0.11706178709546

  Columns 11 through 15 

  -0.04187018929371  -0.00865362914716  -0.00025442703033   0.00048509668227   0.01072262161612

  Columns 16 through 18 

   0.04761582739670   0.12832239364950   0.27000000000000

>> sqrt( b )

ans =

  Columns 1 through 2 

                 0 + 2.86356421265527i                 0 + 2.74612025785256i

  Columns 3 through 4 

                 0 + 2.62342389658562i                 0 + 2.49470026491455i

  Columns 5 through 6 

                 0 + 2.35896288278407i                 0 + 2.21492265168361i

  Columns 7 through 8 

                 0 + 2.06083934927723i                 0 + 1.89426378683584i

  Columns 9 through 10 

                 0 + 1.71155244287339i                 0 + 1.50684711742569i

  Columns 11 through 12 

                 0 + 1.26955295513120i                 0 + 0.97618706018395i

  Columns 13 through 14 

                 0 + 0.54232614454664i  0.60390883612756                    

  Columns 15 through 16 

  1.01169630411735                      1.29705548885793                    

  Columns 17 through 18 

  1.53009034719792                      1.73205080756888                    

>> b = linspace( 5.e6, 9.e7, 200);
>> b = linspace( 5.e6, 9.e7, 200)

b =

  1.0e+007 *

  Columns 1 through 5 

   0.50000000000000   0.54271356783920   0.58542713567839   0.62814070351759   0.67085427135678

  Columns 6 through 10 

   0.71356783919598   0.75628140703518   0.79899497487437   0.84170854271357   0.88442211055276

  Columns 11 through 15 

   0.92713567839196   0.96984924623116   1.01256281407035   1.05527638190955   1.09798994974874

  Columns 16 through 20 

   1.14070351758794   1.18341708542714   1.22613065326633   1.26884422110553   1.31155778894472

  Columns 21 through 25 

   1.35427135678392   1.39698492462312   1.43969849246231   1.48241206030151   1.52512562814070

  Columns 26 through 30 

   1.56783919597990   1.61055276381910   1.65326633165829   1.69597989949749   1.73869346733668

  Columns 31 through 35 

   1.78140703517588   1.82412060301508   1.86683417085427   1.90954773869347   1.95226130653266

  Columns 36 through 40 

   1.99497487437186   2.03768844221106   2.08040201005025   2.12311557788945   2.16582914572864

  Columns 41 through 45 

   2.20854271356784   2.25125628140704   2.29396984924623   2.33668341708543   2.37939698492462

  Columns 46 through 50 

   2.42211055276382   2.46482412060301   2.50753768844221   2.55025125628141   2.59296482412060

  Columns 51 through 55 

   2.63567839195980   2.67839195979899   2.72110552763819   2.76381909547739   2.80653266331658

  Columns 56 through 60 

   2.84924623115578   2.89195979899497   2.93467336683417   2.97738693467337   3.02010050251256

  Columns 61 through 65 

   3.06281407035176   3.10552763819096   3.14824120603015   3.19095477386935   3.23366834170854

  Columns 66 through 70 

   3.27638190954774   3.31909547738693   3.36180904522613   3.40452261306533   3.44723618090452

  Columns 71 through 75 

   3.48994974874372   3.53266331658291   3.57537688442211   3.61809045226131   3.66080402010050

  Columns 76 through 80 

   3.70351758793970   3.74623115577889   3.78894472361809   3.83165829145729   3.87437185929648

  Columns 81 through 85 

   3.91708542713568   3.95979899497487   4.00251256281407   4.04522613065327   4.08793969849246

  Columns 86 through 90 

   4.13065326633166   4.17336683417085   4.21608040201005   4.25879396984925   4.30150753768844

  Columns 91 through 95 

   4.34422110552764   4.38693467336683   4.42964824120603   4.47236180904523   4.51507537688442

  Columns 96 through 100 

   4.55778894472362   4.60050251256281   4.64321608040201   4.68592964824121   4.72864321608040

  Columns 101 through 105 

   4.77135678391960   4.81407035175879   4.85678391959799   4.89949748743719   4.94221105527638

  Columns 106 through 110 

   4.98492462311558   5.02763819095477   5.07035175879397   5.11306532663317   5.15577889447236

  Columns 111 through 115 

   5.19849246231156   5.24120603015075   5.28391959798995   5.32663316582915   5.36934673366834

  Columns 116 through 120 

   5.41206030150754   5.45477386934673   5.49748743718593   5.54020100502512   5.58291457286432

  Columns 121 through 125 

   5.62562814070352   5.66834170854271   5.71105527638191   5.75376884422111   5.79648241206030

  Columns 126 through 130 

   5.83919597989950   5.88190954773869   5.92462311557789   5.96733668341709   6.01005025125628

  Columns 131 through 135 

   6.05276381909548   6.09547738693467   6.13819095477387   6.18090452261307   6.22361809045226

  Columns 136 through 140 

   6.26633165829146   6.30904522613065   6.35175879396985   6.39447236180905   6.43718592964824

  Columns 141 through 145 

   6.47989949748744   6.52261306532663   6.56532663316583   6.60804020100503   6.65075376884422

  Columns 146 through 150 

   6.69346733668342   6.73618090452261   6.77889447236181   6.82160804020101   6.86432160804020

  Columns 151 through 155 

   6.90703517587940   6.94974874371859   6.99246231155779   7.03517587939698   7.07788944723618

  Columns 156 through 160 

   7.12060301507538   7.16331658291457   7.20603015075377   7.24874371859296   7.29145728643216

  Columns 161 through 165 

   7.33417085427136   7.37688442211055   7.41959798994975   7.46231155778894   7.50502512562814

  Columns 166 through 170 

   7.54773869346734   7.59045226130653   7.63316582914573   7.67587939698492   7.71859296482412

  Columns 171 through 175 

   7.76130653266332   7.80402010050251   7.84673366834171   7.88944723618090   7.93216080402010

  Columns 176 through 180 

   7.97487437185930   8.01758793969849   8.06030150753769   8.10301507537688   8.14572864321608

  Columns 181 through 185 

   8.18844221105528   8.23115577889447   8.27386934673367   8.31658291457286   8.35929648241206

  Columns 186 through 190 

   8.40201005025126   8.44472361809045   8.48743718592965   8.53015075376885   8.57286432160804

  Columns 191 through 195 

   8.61557788944724   8.65829145728643   8.70100502512563   8.74371859296482   8.78643216080402

  Columns 196 through 200 

   8.82914572864322   8.87185929648241   8.91457286432161   8.95728643216080   9.00000000000000

>> b = linspace( 5.e6, 9.e7, 200);
>> one = (b+sqrt(b.^2-1)).*(b-sqrt(b.^2-1));
>> plot( b, one, '.' )
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> R = linspace( 10, 20, 101 );
>> f = 1.0./(2*R) - sin( (1+1/5280)./(2*R) );
>> plot( R, f )
>> grid
>> R = linspace( 10, 40, 101 );
>> f = 1.0./(2*R) - sin( (1+1/5280)./(2*R) );
>> plot( R, f )
>> grid
>> help fzero

 FZERO  Scalar nonlinear zero finding. 
    X = FZERO(FUN,X0) tries to find a zero of the function FUN near X0. 
    FUN accepts real scalar input X and returns a real scalar function value F 
    evaluated at X.  The value X returned by FZERO is near a point where FUN 
    changes sign (if FUN is continuous), or NaN if the search fails.  
 
    X = FZERO(FUN,X0), where X is a vector of length 2, assumes X0 is an 
    interval where the sign of FUN(X0(1)) differs from the sign of FUN(X0(2)).
    An error occurs if this is not true.  Calling FZERO with an interval  
    guarantees FZERO will return a value near a point where FUN changes 
    sign.
 
    X = FZERO(FUN,X0), where X0 is a scalar value, uses X0 as a starting guess. 
    FZERO looks for an interval containing a sign change for FUN and 
    containing X0.  If no such interval is found, NaN is returned.  
    In this case, the search terminates when the search interval 
    is expanded until an Inf, NaN, or complex value is found. 
 
    X = FZERO(FUN,X0,OPTIONS) minimizes with the default optimization
    parameters replaced by values in the structure OPTIONS, an argument
    created with the OPTIMSET function.  See OPTIMSET for details.  Used
    options are Display and TolX. Use OPTIONS = [] as a place holder if
    no options are set.
 
    X = FZERO(FUN,X0,OPTIONS,P1,P2,...) allows for additional arguments
    which are passed to the function, F=feval(FUN,X,P1,P2,...).  Pass an empty
    matrix for OPTIONS to use the default values.
 
    [X,FVAL]= FZERO(FUN,...) returns the value of the objective function,
    described in FUN, at X.
 
    [X,FVAL,EXITFLAG] = FZERO(...) returns a string EXITFLAG that 
    describes the exit condition of FZERO.  
    If EXITFLAG is:
       > 0 then FZERO found a zero X
       < 0 then no interval was found with a sign change, or
           NaN or Inf function value was encountered during search 
           for an interval containing a sign change, or
           a complex function value was encountered during search 
           for an interval containing a sign change.
    
    [X,FVAL,EXITFLAG,OUTPUT] = FZERO(...) returns a structure
    OUTPUT with the number of iterations taken in OUTPUT.iterations.
 
    Examples
      FUN can be specified using @:
         X = fzero(@sin,3)
      returns pi.
         X = fzero(@sin, 3, optimset('disp','iter')) 
      returns pi, uses the default tolerance and displays iteration information.
 
      FUN can also be an inline object:
         X = fzero(inline('sin(3*x)'),2);
 
    Limitations
         X = fzero(inline('abs(x)+1'), 1) 
      returns NaN since this function does not change sign anywhere on the 
      real axis (and does not have a zero as well).
         X = fzero(@tan,2)
      returns X near 1.5708 because the discontinuity of this function near the 
      point X gives the appearance (numerically) that the function changes sign at X.
 
    See also ROOTS, FMINBND, @, INLINE.

>> fzero( inline( '1.0./(2*R) - sin( (1+1/5280)./(2*R) )', 
??? fzero( inline( '1.0./(2*R) - sin( (1+1/5280)./(2*R) )', 
                                                            |
Error: Expected a variable, function, or constant, found "end of line".

>> fzero( inline( '1.0./(2*R) - sin( (1+1/5280)./(2*R) )','R'), 14.5 )

ans =

  14.83618948950094

>> fzero( inline( '1.0./(2*R) - sin( (1+1/5280)./(2*R) )','R') )
??? Error using ==> fzero
FZERO requires at least two input arguments

>> fzero( inline( '1.0./(2*R) - sin( (1+1/5280)./(2*R) )','R'), -5 )

ans =

    7.137663076248088e-016

>> fzero( inline( '1.0./(2*R) - sin( (1+1/5280)./(2*R) )','R'), 100 )

ans =

  14.83618948949525
