Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #14272 > unrolled thread

cannot work a "conditional If"

Started bypatrice.haldemann@gmail.com
First post2013-04-22 07:13 +0000
Last post2013-04-24 10:16 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  cannot work a "conditional If" patrice.haldemann@gmail.com - 2013-04-22 07:13 +0000
    Re: cannot work a "conditional If" debguy <johnandsara2@cox.net> - 2013-04-24 10:16 +0000

#14272 — cannot work a "conditional If"

Frompatrice.haldemann@gmail.com
Date2013-04-22 07:13 +0000
Subjectcannot work a "conditional If"
Message-ID<kl2nvh$2dg$1@smc.vnet.net>
Hi everybody

I am a newcomer in the mathematica world and I have been facing an issue for some days.

I have used mathematica to solve an NDSolve and it has worked well

I have tested  expressions with the solution of NDSolve and its has worked well.

Now if I use an expression in an "Conditional If", it does not work. 

Thank you for your help


See below

signy[t_] := y[t] /. orbit   where y[t] is the solution of the NDSolve

signy[1]

{-1.96861}

 ang12[t_] := If[signy[t] > 3, 10, 6]

 ang12[1]

If[{-1.96861} > 3, 10, 6]


 

[toc] | [next] | [standalone]


#14282

Fromdebguy <johnandsara2@cox.net>
Date2013-04-24 10:16 +0000
Message-ID<kl8beo$noe$1@smc.vnet.net>
In reply to#14272
but you posted the answer didn't you?

    If[{-1.96861} > 3, 10, 6]

does not work

    If[{-1.96861}[[1]] > 3, 10, 6]

works

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web