Recent content by DavidHume

  1. DavidHume

    MATLAB Solving MATLAB Loop with X & Latitudes

    Or, better: for ix0=1:length(lats) ans(ix0,:)=lats(ix0)-X; end;
  2. DavidHume

    MATLAB Solving MATLAB Loop with X & Latitudes

    You probably want something like this: lats=[41.01 43.78 44.42 41.25 42.80 42.75 42.49 42.49 42.78 44.32 42.15 41.93 41.17]; X=[41:46]; ans=zeros(length(lats),length(X)); for ix0=1:length(lats) for ix1=1:length(X) ans(ix0,ix1)=lats(ix0)-X(ix1); end; end; So, "ans" will contain your "lats" by...
  3. DavidHume

    Solve Reduction Problem for (1+x)^1/3 in Mathcad

    I see - your workaround should be fine as long as you only care about the principal root.
  4. DavidHume

    Solve Reduction Problem for (1+x)^1/3 in Mathcad

    It's not true that the range of cube root is real numbers - it's not even true for the cube root of one. Take a look at this MathCAD paper - http://gekor-it.de/media/81174be56cf4ccc5ffff870fac144233.pdf - where the author shows the cube roots of one to be (1, (-1/2)+(√3 i)/2, (-1/2)-(√3 i)/2)...
  5. DavidHume

    Solve Reduction Problem for (1+x)^1/3 in Mathcad

    Except that raising a negative number to a fractional power generally results in a complex number. For instance, here are the results we get raising 2 and -2 to the 1/3 power (in J since I don't have MathCAD): 2 _2 ^ %3 1.25992 0.629961j1.09112 As you can see, the result of the negative...
  6. DavidHume

    Programming and Computer Science Resources

    A computational notation, "J": http://www.jsoftware.com
  7. DavidHume

    The Relation, Function & Operation

    The fuzzy thinking on this distinction is exacerbated by the sloppy terminology of (most) computer languages which distinguish between a function and an operator based solely on the symbols used. So, in computer languages, "+" is called an operator but "plus" would be a function even if "plus"...
  8. DavidHume

    Method of determining volume of water in an arbitrary container

    Could you drop the float into an empty tank and monitor the volume as you fill it to calibrate the float?
  9. DavidHume

    Simple Economic / Stock price model

    You might want to pick, e.g. daily returns from a standard normal distribution, then apply these to a random starting price to generate realistic-looking returns. To make the returns more like actual market returns, you should alter the standard normal distribution to one with a skinnier bell...
  10. DavidHume

    Matrix Multiplication and sigma notation

    I think my explanation agrees with Wikipedia. Here's an example: Say we have two tables "A" and "B": A 1 3 5 7 B 2 4 6 8 Matrix multiply (in the linear executable notation J - see jsoftware.com): A+/ . *B 20 28 52 76 This is illustrated below by positioning B...
  11. DavidHume

    Matrix Multiplication and sigma notation

    "Sigma" notation is simply summation. Matrix multiplication is the summation of the rows of one matrix multiplied by the columns of another matrix.
  12. DavidHume

    How can repeated functions be easily defined and applied?

    The J programming language provides a complete, consistent, executable version of mathematical notation (see jsoftware.com). For instance, we can use the "power" conjunction to apply a function to its result repeatedly. So, if we define a function "f" which squares its input, f =: 3 ...
  13. DavidHume

    What Are the Best Resources for Learning Mathematical Finance?

    I would recommend the Jaeckel book "Monte Carlo methods in finance" as well as the Hull & White (now maybe just Hull) on options.
  14. DavidHume

    Medical Strength training while dieting = weight gain?

    One big dis-advantage of the low-carb (if it = high-protein) diet is increased likelihood of kidney damage though this appears to be mostly in those with reduced kidney functions: http://www.webmd.com/diet/news/20030317/high-protein-diets-can-hurt-kidneys . However, as this article points out...
  15. DavidHume

    How many ways are there to checkmate someone in chess?

    Well, taking the upper bound of 2^155 from the Shannon citation on Wikipedia, if you had a million computers calculating 2.4 billion moves per second, it would only take about an Avogadro's number of years to figure out all the games.
Back
Top