MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

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][0] == \[Psi]0,  
> \[Psi]'[0] == \[Kappa]0, x[0] == RCos[\[Psi]0], y[0] == RSin[\[Psi]0]},  
> {\[Psi], x, y}, {s, 0, 2}];
>
> L = s /. FindRoot[(ArcTan[y[s]/x[s]] /. \[Psi]sol)[[1]] == (\[Psi][s] /.  
> \[Psi]sol)[[1]], {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)[[1]];
>   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)[[1]])/L, (\[Psi]0  
> \[Minus] \[Theta])180/\[Pi],loadCos[\[Theta]], ((\[Psi]'[L] \[Minus]  
> \[Kappa]0)/xb[L]) /. \[Psi]sol[[1]]})
>
> \[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
  • Previous by thread: Mathematica
  • Next by thread: Wolfram LinkLibrary and additional dll on Windows