mmcdara

7891 Reputation

22 Badges

9 years, 60 days

MaplePrimes Activity


These are replies submitted by mmcdara

@ogunmiloro 

If I understand correctly you want do do this: 

  • You have a theoritical model B(T), ...H(T) which depends on 12 parameters (Ggamma, ..., xi) and 16 observations of a given quantity iV at times tV = 1, ..16.
  • You want to estimate the unknown values of these 12 parameters by minimizing some loss function of the form 
    add( (i(T)-iV[T])^2, T=1..16).

Am I right?

Because if I am your problem seems incorrectly posed.
In these kind of "parameter fitting" problems, the output of the model, let's say B(T), must be a theoritical, or a priori, model of the empirical observations iV.
More clearly, B(T) and iV must represent the same physical quantity.
But if it is the case, iV cannot be considered as the empirical observation of, let's say, C(T) or DD(T), ...

I would understant your problem if the data you want to adjust your model on were resumed by a 16 by 7 matrix (7 unknowns B(T), ...H(T)), not a single vector.
Can you clarify this point in order I might go forward?

Thanks.

 

@ogunmiloro 

Ok I think I understand. Now, what is the relation between i(T) and B(T), C(T), ... H(T) ?

I think that no progress can be obtain unless you give the reference of "the journal that i have been referred to"
Something about ta variant of the Falkner-Skan equation maybe?

@acer 

When I'm at home I only have access to Maple 2015, but I will use valuesplit when back to the office (in 10 days).
Thanks for the tip.

I just found a trick to fix the issue but it seems a little like looking for noon at 2 PM...

A := Sample(Uniform(0, 1), [N, P]):
C := CorrelationMatrix(A);
X := < Vector[column](P, [1, -1, 0$(P-2)]) | C >:
matrixplot(
  X, 
  heights=histogram, 
  colorscheme=["blue", "white", "red"],   
  lightmodel=none, 
  orientation=[0$3], 
  labels=[("")$3], 
  view=[default, 2..numelems(X[1,..])+1, default], 
  tickmarks=[[seq(i+1/2=A||i, i=1..P)], [seq(i+1/2=A||(i-1), i=1..P)], default], 
  title="Empirical Correlation Matrix" 
);

 

@dharr 

Thanks dharr, I will fix this tomorrow when back to the office.

@acer 

To end this thread, all goes right.

Thanks

@vv 

You wrote "The radii of the balls must be given, as I did in my solution."
It' wasn't to you that I responded and your phrase only reflects your interpretation of the problem, not the incompletely posed problem that was submited.


Your second phrase "It is actually a sphere packing problem." reveals you do not know what sphere packing actually is.
Sphere packing is far more complex than what you did and aims to find the (generally) more dense filling of closed domain with, either spheres (discs) of equal diameters, or either with diameters in some progression.
A lot of solutions are known for "simple" 2D shapes: rectangles, triangles, discs, a few in 3D shapes and nothing in higher dimensions.

Then the sparse solutions you produced cannot be qualified as "sphere packing" in any way.

I suggest you to look at this site before talking about sphere packing
http://www.packomania.com
 

@acer 

It's not clear to me.

  1. The help page for topic VectorCalculus,Curvature only says:
    "The Curvature(C, t) command computes the curvature of the curve C."

    Which means that "the curvature of [a] curve" (not a surface) is something that must me perfectly defined in some text book.
     
  2. The help page for topic Definition,curvature gives indeed two definitions.
    This doesn't help to solve the above point where "the curvature of the curve" : here the curvature is implicitely supposed to have a unique definition.
     
  3. I have spent a few hours on the web to clarify this
    Some define the curvature of a plane curve by using |y''| (https://math.libretexts.org/Bookshelves/Calculus/Supplemental_Modules_(Calculus)/Vector_Calculus/2%3A_Vector-Valued_Functions_and_Motion_in_Space/2.3%3A_Curvature_and_Normal_Vectors_of_a_Curve for instance) while others don't (http://web.cs.iastate.edu/~cs577/handouts/curvature.pdf to cite a few).
     
  4. In the Encyclopedia Universalis the curvature uses y'', and Guggenheimeri, its 1977 edition of "Differential geometry"  defines the curvature as the reciprocal of the radius of curvature (def 2.7) implying thus the curvature is positive ... but in exercice 2.2 he uses y'' instead of |y''|.
    As I replied to rlopez, it seems that in France the definition uses y'', not |y''| ( at least in university courses)


All this to say that I even doubt that a unique definition of the curvature of a curve does exist.

For surfaces the things seems clear: the curvature (total or Gauss') has a sign. If not one couldn't talk about elliptic, parabolic or hyperbolic points.


To conclude this, maybe the help page for topic VectorCalculus,Curvature should clearly specify the definition of the curvature that is used. This would prevent this type of discussion.

@rlopez 

@acer

Thanks for this historical context.

For plane curves, it is still taught in France that the curvature is "signed", and because it is rather common here that some people refer to Mathematica (which I do not use), this later seems to a "signed" curvature in this case (http://mathworld.wolfram.com/Curvature.html).
I remember being taught that surfaces had also positive and negative curvature (the saddle surface for instance), but maybe I'm a little bit old-fashioned?

Nevertheless, unsigning the curvature can be problematic in some situations like this one (who motivated my question):

I have a smooth 2D curve and a circle rolling over it. If the curve has a "signed curvature" which is everywhere negative, we are certain that the circle tangents the curve at exactly one point. If the "signed curvature" is positive this is the case if and only if the radius of curvature is larger than the radius of the rolling circle.
As a lazzy man I used VectorCalculus:-Curvature (instead of coding the "old 2D formula") to detect the regions where possible double-tangents situations could occur (that is where the curvature, I thought was signed, was positive): used on a concave curve I surprisingly obtained non nul intervals where this situations happened.

@acer 

Thanks acer.
It works just as expected on this notional example. 
I'm going to adapt it to my true problem (I hope the simplified problem I submitted here is not too far from the real one).

I'll give you a return.

PS: thanks also for all the advices

@Thomas Richard 

Just an information: I realized that ste return of the command ssystem("chmod +x  MyFile.R") was in fact [-1, " "], meanning the command failed.
The file MyFile.R then is executable and the next command ssystem("..../bin/Rscript MyFile.R") thus should fail too... but it happened to work and R terminated correctly the jod.

The moral seems to be "contrary to what is written in the reference I provide in my previous reply, there is no need for the script file MyFile.R to be executable ?!?!
Trusting the docs I lived for years with this believing.

@Thomas Richard 

There are multiple ways to run a R script file from a terminal.
Among them there is the comand  Rscript ScriptFile.R, which is the only one I can launch from a (s)system Maple's command.
The fact Rscript imposes ScriptFile.R seems indeed very strange, but it's fact, and I do not know why it is so.
Note that the other methods for "executing" ScriptFile.R do not require this permission.

I do not find an english link where this is clearly written but just this french one:
https://informatique-mia.inra.fr/r4ciam/node/128

Here is an excerpt from this web page: at item 4 "

     Rendre le fichier exécutable : chmod +x exempleS.R

means "Make the file executable ..."

Rscript.pdf

Thanks for your interest

@Allan Wittkopf 

You're perfectly right about the the conditionally stability of forward Euler and Crank-Nicholson schemes.
This is what I suspected but in the Maple 2015's help pages it's only written that "The first mode of operation uses the default method, which is a centered implicit scheme", suggesting this is Backward Euler which is used (Forward Euker being explicit and C-K being semi-implicit).
That's why I wrote "one should reduce space test (and probably time step too, even if the scheme is said to be implicit and, theoretically, not constrained by any CFL condition)".

Here is a serious flaw in the help pages.

By the way, where did you discover this "method=theta[..]" trick?
It really seems to be an undocumented feature.

"

@Ronan 

Thanks, it's the seconf one.

PS: I searched for "bouncing" and difn't find to, sorry

First 119 120 121 122 123 124 125 Last Page 121 of 154