Electronic Schematics (alt.binaries.schematics.electronic) A place to show and share your electronics schematic drawings.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
external usenet poster
 
Posts: 2,221
Default "Algebraic" IF Statement Evaluation

I need to evaluate...

IF(t,1,0) (If t is true, output 1, if t is false, output 0 (numeric),
t may be something like V11 = 7, for example)

BUT I have no IF statement handling capability at this level of a
simulation.

I do have algebraic capability.

Is there some cute way to do this algebraically?

...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

"When the government fears the People, that is Liberty.
When the People fear the Government, that is Tyranny."
- attributed to Thomas Jefferson by his contemporaries

"The Constitution is not an instrument for the government to
restrain the people, it is an instrument for the people to
restrain the government -- lest it come to dominate our lives and
interests." - Patrick Henry
  #2   Report Post  
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
external usenet poster
 
Posts: 3
Default "Algebraic" IF Statement Evaluation

On Tue, 19 May 2009 09:19:33 -0700, Jim Thompson
wrote:

I need to evaluate...

IF(t,1,0) (If t is true, output 1, if t is false, output 0 (numeric),
t may be something like V11 = 7, for example)

BUT I have no IF statement handling capability at this level of a
simulation.

I do have algebraic capability.

Is there some cute way to do this algebraically?

...Jim Thompson


X=int(V11/7)
X/X
  #3   Report Post  
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
external usenet poster
 
Posts: 3
Default "Algebraic" IF Statement Evaluation

On Tue, 19 May 2009 09:19:33 -0700, Jim Thompson
wrote:

I need to evaluate...

IF(t,1,0) (If t is true, output 1, if t is false, output 0 (numeric),
t may be something like V11 = 7, for example)

BUT I have no IF statement handling capability at this level of a
simulation.

I do have algebraic capability.

Is there some cute way to do this algebraically?

...Jim Thompson


gah!
messed that up :S

  #6   Report Post  
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
external usenet poster
 
Posts: 421
Default "Algebraic" IF Statement Evaluation

Jim Thompson wrote:

I need to evaluate...

IF(t,1,0) (If t is true, output 1, if t is false, output 0 (numeric),
t may be something like V11 = 7, for example)

BUT I have no IF statement handling capability at this level of a
simulation.

I do have algebraic capability.

Is there some cute way to do this algebraically?

...Jim Thompson


Do you have a unit step function (u(x)) available?

--
Paul Hovnanian
----------------------------------------------------------------------
Have gnu, will travel.
  #7   Report Post  
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
external usenet poster
 
Posts: 2,221
Default "Algebraic" IF Statement Evaluation

On Tue, 19 May 2009 13:49:46 -0400, Spehro Pefhany
wrote:

On Tue, 19 May 2009 09:19:33 -0700, Jim Thompson
wrote:

I need to evaluate...

IF(t,1,0) (If t is true, output 1, if t is false, output 0 (numeric),
t may be something like V11 = 7, for example)

BUT I have no IF statement handling capability at this level of a
simulation.

I do have algebraic capability.

Is there some cute way to do this algebraically?

...Jim Thompson


(1+sgn(V11-7))/2 ?


I don't have function SGN :-(

...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

Stormy on the East Coast today... due to Bush's failed policies.
  #8   Report Post  
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
external usenet poster
 
Posts: 1,475
Default "Algebraic" IF Statement Evaluation

On Tue, 19 May 2009 09:19:33 -0700, Jim Thompson
wrote:

I need to evaluate...

IF(t,1,0) (If t is true, output 1, if t is false, output 0 (numeric),
t may be something like V11 = 7, for example)

BUT I have no IF statement handling capability at this level of a
simulation.

I do have algebraic capability.

Is there some cute way to do this algebraically?

...Jim Thompson


(1+sgn(V11-7))/2 ?


  #11   Report Post  
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
external usenet poster
 
Posts: 331
Default "Algebraic" IF Statement Evaluation

On 2009-05-19, Jim Thompson wrote:
I need to evaluate...

IF(t,1,0) (If t is true, output 1, if t is false, output 0 (numeric),
t may be something like V11 = 7, for example)

BUT I have no IF statement handling capability at this level of a
simulation.

I do have algebraic capability.

Is there some cute way to do this algebraically?

...Jim Thompson


are there any operators or functions that can give a different
mumeric result depending on the truth of the input.

many systems have false as 0 and true as 1 (or less common -1)



else maybe something like (sgn( sgn(V11-7) *2 +1 ) + 1 ) /2
  #12   Report Post  
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
external usenet poster
 
Posts: 272
Default "Algebraic" IF Statement Evaluation


Jim Thompson wrote:

I don't have INT available, I do have ABS and some trig functions


ABS has an intrinsic "if" that can do it. Spehro showed the method.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting Excel 2007 Nested "If" Statement to Excel 2003: Overcom Jim Thompson Electronic Schematics 0 June 24th 08 05:08 PM
For women who desire the traditional 12-marker dials, the "Faceto,""Juro" and "Rilati" all add a little more functionality, without sacrificingthe diamonds. [email protected] Woodworking 0 April 19th 08 11:12 AM
Orange Peel Texture? "Knockdown" or "Skip Trowel" also "California Knock-down" HotRod Home Repair 6 September 28th 06 01:48 PM


All times are GMT +1. The time now is 06:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 DIYbanter.
The comments are property of their posters.
 

About Us

"It's about DIY & home improvement"