Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.6K Views
|
7 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Show output function interpolation

Posted 2 years ago

You really only need that `b` is real. In[120]:= e1 = a^(b c); e2 = (a^b)^c; In[122]:= Simplify[e1 - e2, Assumptions -> {a > 0, Element[b, Reals]}] Out[122]= 0 By definition `a^b` is `Exp[b*Log[a]]`. From there it can be worked out that the value of `c` is not relevant in this, and it comes down to whether `Log[a^b] == Log[a]*b`. The conditions shown above are sufficient though not necessary. Possibly someone has a decent reference handy. Mine is "I worked it out by hand using the definition of `a^b`".

I have these inputs as K

{0.00001, 0.00001, 0.}  1.0000000000000002e-10
{0.00001, 0.00001, 0.05}    2.607287266909108e-10
{0.00001, 0.00001, 0.1} 6.268239370533253e-10
{0.00001, 0.00001, 0.15}    1.404449897248381e-9
{0.00001, 0.00001, 0.2} 2.959062635977029e-9
{0.00001, 0.00001, 0.25}    5.907078426958897e-9
{0.00001, 0.00001, 0.3} 1.1245129573903091e-8

The first column is a, the second column is b, the third column is c, the fourth column is x x is a function of a b and c.

Now I have the following function in Mathematica:

Clear[K, iJDP]
K = ToExpression[Import[NotebookDirectory[] <> "JDP.txt", "TSV"]];
iJDP = Interpolation[Map[{#[[1]], #[[2]]} &, K], 
   InterpolationOrder -> {1, 1, 1}, Method -> "Spline"];

I would like to see the output in a,b,c I tried:

test1 = iJDP[a,b,c]
print[test1]

also with roun bracket print(test1)

I tried:

??iJDP

I tried:

Short[test,3]
Print[test]

Nothing seems to work.

I have this kind of result

{BSplineFunction[3,{{0.00001,1.},{0.00001,1.},{0.,1.}},{1,1,1},{False,False,False},{{{{1.*10^-10,2.60729*10^-10

But no the real output.

POSTED BY: Daniela Tortora
7 Replies

Sorry, please ignore the second part of my last reply.

POSTED BY: Gianluca Gorni
POSTED BY: Gianluca Gorni

Many thanks for your replies. This is the file txt. @Gianluca Gorni, is that the result of the output? how do you print it? Many thanks

Attachments:
POSTED BY: Daniela Tortora

This is what I get:

{{{-10 + 0.000010000000000000003` e, -10 + 
    0.000010000000000000003` e, -10.`}}, {{-10 + 
    0.000026072872669091084` e, -10 + 
    0.000026072872669091084` e, -10 + 
    0.1303643633454554` e}}, {{-10 + 0.00006268239370533254` e, -10 + 
    0.00006268239370533254` e, -10 + 0.6268239370533254` e}}, {{-9 + 
    0.000014044498972483811` e, -9 + 0.000014044498972483811` e, -9 + 
    0.21066748458725715` e}}, {{-9 + 0.000029590626359770294` e, -9 + 
    0.000029590626359770294` e, -9 + 0.5918125271954059` e}}, {{-9 + 
    0.00005907078426958898` e, -9 + 0.00005907078426958898` e, -9 + 
    1.4767696067397242` e}}, {{-8 + 0.000011245129573903094` e, -8 + 
    0.000011245129573903094` e, -8 + 0.33735388721709275` e}}}
POSTED BY: Gianluca Gorni

Can you give us a sample JDP.txt file as attachment?

POSTED BY: Gianluca Gorni

I think that https://mathematica.stackexchange.com/questions/59944/extracting-the-function-from-interpolatingfunction-object answers your question, and it works with higher interpolation order.

POSTED BY: charles monneron

What do you get from this:

ToExpression[Import[NotebookDirectory[] <> "JDP.txt", "TSV"]]

I get nothing useful. Maybe your JDP.txt is different from mine.

POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard