Re: General--Difficulties in Understanding Mathematica Syntax

• To: mathgroup at smc.vnet.net
• Subject: [mg68959] Re: [mg68908] General--Difficulties in Understanding Mathematica Syntax
• From: "Chris Chiasson" <chris at chiasson.name>
• Date: Fri, 25 Aug 2006 05:35:20 -0400 (EDT)
• References: <200608231115.HAA24930@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Your equations seem to be dimensionally inconsistent. If you need more

> Hi Mathematica Experts,
>
> Sorry for a lengthy query.
>
> I am new to Mathematica. The syntax of mathematica is quite different from other programming languages.
> I am confused how to use loops like "If",FOR;DO;...
>
> Here i am giving details of a problem i want to solve. I made an attempt to solve this. Please go thru it and give me necessary corrections.
>
> Here i am giving the details:
> P = 10.3;l = 0.45mm;T = 0.9;r0 = 0.025mm;d = 0.1643mm;
> r[xk_, yk_] := (Sqrt[(x - xk)^2 + (y - yk)^2]);
> Intensity[xk_, yk_] := (P/(2*Pi*r[xk, yk]*l))*T^(r[xk, yk] - r0);
> Imoy=[Integrate[Intensity[xk, yk]],{xk, 0.1, -0.1}, {yk, 0.1, -0.1}] ;
> Print[Imoy]
>
> Then i am getting some value, which is not the correct one.
> How to check the output for each step in Mathematica(for example: if i want to find out the values of "r", In C language i can use Printf statement to print the values of "r" for each xk,yk)
>
> And if i want to evaluate the "Intensity[xk_, yk_] " depending on a condition (say: r[xk,yk]<d) [I think it can be done by using IF statement, but i have no clue how to use the IF statement in MATHEMATICA].
>
>
> It would be better if one can provide me some examples., or documentation which contains some solved examples in Mathematica.
>
>
> Link to the forum page for this post:
> http://www.mathematica-users.org/webMathematica/wiki/wiki.jsp?pageName=Special:Forum_ViewTopic&pid=12943#p12943
> Posted through http://www.mathematica-users.org [[postId=12943]]
>
>
>

--
http://chris.chiasson.name/

```

• Prev by Date: Re: Problems solving using Solve
• Next by Date: Re: General--Difficulties in Understanding Mathematica Syntax
• Previous by thread: General--Difficulties in Understanding Mathematica Syntax
• Next by thread: Re: General--Difficulties in Understanding Mathematica Syntax