       Re: Mathematica

• To: mathgroup at smc.vnet.net
• Subject: [mg121987] Re: Mathematica
• From: "Oleksandr Rasputinov" <oleksandr_rasputinov at hmamail.com>
• Date: Sat, 8 Oct 2011 05:32:51 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <j6me6r\$73v\$1@smc.vnet.net>

```On Fri, 07 Oct 2011 09:45:15 +0100, Rajnish <errajnish4ever at gmail.com>
wrote:

> I am getting getting errors when i evaluate the notebook for the
> mentioned code. Its for a buckling equation. I am not able to find the
> errors. Can anyone help.
>
> lengL[arg1_] :=
>  (p = arg1;
>   \[Psi]sol = NDSolve[{\[Psi]''[s] + pSin[\[Psi][s]] == 0, y'[s] ==
> Sin[\[Psi][s]], x'[s] == Cos[\[Psi][s]], \[Psi] == \[Psi]0,
> \[Psi]' == \[Kappa]0, x == RCos[\[Psi]0], y == RSin[\[Psi]0]},
> {\[Psi], x, y}, {s, 0, 2}];
>
> L = s /. FindRoot[(ArcTan[y[s]/x[s]] /. \[Psi]sol)[] == (\[Psi][s] /.
> \[Psi]sol)[], {s, 0.75, 1.25}])
>
> endstrain[arg2_, arg3_] := (\[Psi]0 = arg2 \[Pi]/180;
>                             R = arg3;
>   load = xx /. FindRoot[lengL[xx] == 1, {xx, 20, 21}];
>   \[Theta] = (\[Psi][L] /. \[Psi]sol)[];
>   xb[s_] = Cos[\[Theta]] x[s] + Sin[\[Theta]] y[s];
>   yb[s_] = Cos[\[Theta]] y[s] \[Minus] Sin[\[Theta]] x[s];
>   {strain = 100 (L + R \[Minus] (xb[L] /. \[Psi]sol)[])/L, (\[Psi]0
> \[Kappa]0)/xb[L]) /. \[Psi]sol[]})
>
> \[Psi]solfind[varg_?NumericQ, \[Kappa]0arg_?NumericQ,parg_?NumericQ,
> \[Psi]0arg_,uarg_] := (p = parg; v = varg; \[Kappa]0 = \[Kappa]0arg;
> \[Psi]0 = (\[Psi]0arg \[Pi])/180 ;
>
> Rajnish
>

Click on the red [+] next to the cell bracket and the error is
highlighted. In this case you are missing a ) before the terminal ;.

If the errors relate to more than just syntax, you will probably have to
be more specific about what they are in order to receive any assistance.

```

• Prev by Date: Re: FFT Speed
• Next by Date: Re: average of the consecutive coin tosses