Jump to content

Ohm's Law Calculator


The Buzzard

Recommended Posts

It does not matter what the formula says, you can see that the code is setting a variable to something that involves dividing by zero - hence the error.

Link to comment
Share on other sites

  • Replies 104
  • Created
  • Last Reply

Top Posters In This Topic

  • The Buzzard

    56

  • Lee Mac

    29

  • CAB

    11

  • SEANT

    3

Top Posters In This Topic

Posted Images

It does not matter what the formula says, you can see that the code is setting a variable to something that involves dividing by zero - hence the error.

 

 

Ok I added it to the error check, Now where is the bracket mix-up you had mentioned?

Link to comment
Share on other sites

I am speaking of formula 3 on the wheel which is multiplication.

We are also filling in R in addition to this. So I guess this still needs to be in the error check even if the formula selected shows multiplication?

 

 

I am getting this now:error: function undefined for argument

Link to comment
Share on other sites

I am getting this now:error: function undefined for argument

 

I'm not sure what this is. The code i added was such a small snippet, there really isn't much that can go wrong.

Link to comment
Share on other sites

I'm not sure what this is. The code i added was such a small snippet, there really isn't much that can go wrong.

 

Lee, Can you please test this copy for me. Just want to make sure we are both on the same channel.

 

Thanks

OLCv3.zip

Link to comment
Share on other sites

Lee, Can you please test this copy for me. Just want to make sure we are both on the same channel.

 

Thanks

 

I took the liberty of testing one of those free internet Ohm's Law Calculators. I enter one negative value and one positive value. In the results it replies NaN. When I do the same with my calculator I get this: ; error: function undefined for argument: -14400.0 after the program crashes. I am not sure if before putting in the latest changes that the program would have done the same thing. I am also not sure what the latest changes are supose to do. If I enter good values, The program works as it should, So I am a bit confused over this. The (setq c$plex i) I would assume is suppose to place an i after the value, But I have yet to see this happen.

 

What am I doing wrong? or What is suppose to happen?

Link to comment
Share on other sites

Try this, a couple of ABS were missed.

 

HOT DOG Lee!

Thats the ticket!

I will sleep good tonight!

 

Thank You!

Link to comment
Share on other sites

HOT DOG Lee!

Thats the ticket!

I will sleep good tonight!

 

Thank You!

 

One more question Lee,

 

What is the interpertation of the i or j if your an engineer mean?

Link to comment
Share on other sites

One more question Lee,

 

What is the interpertation of the i or j if your an engineer mean?

 

 

Ok Lee, I dug this up on Wikipedia.

 

  • In electrical engineering and related fields, the imaginary unit is often written as d1ba1826b75c9582c603f8670ec785e4.png to avoid confusion with electrical current as a function of time, traditionally denoted by i(t) or just i. The Python programming language also uses j to denote the imaginary unit, while in MATLAB, both notations i and j are associated with the imaginary unit.
  • Some extra care needs to be taken in certain textbooks which define j = −i, in particular to travelling waves (e.g. a right travelling plane wave in the x direction e8cb2217c78e2e7d6d167c2f39ca1fd7.png).
  • Some texts use the Greek letter iota ( ι ) to write the imaginary unit to avoid confusion. For example: Biquaternion.

After all that, I much rather not know.

 

I will be making some more changes to the interface and some internal programming changes. I will repost to the first post when all has been completed.

 

Again Thanks for your time, knowledge & patience.

The Buzzard

Link to comment
Share on other sites

I'm glad we got it sorted. :)

 

One more thing I did notice (and changed in the posted version), is this line:

 

 (action_tile "sFN"                                                           ;When action_tile sFN is selected
  "(setq IMG $value)                                                          ;Set variable IMG ~ (Image) to list value
   (itoa 0)                                                                   ;Return the conversion of an integer into a string 
   (OLC_UFI)"                                                                 ;Go to OLC_UFI Image Function
 )  

 

What is the purpose of the (itoa 0)?

Link to comment
Share on other sites

I'm glad we got it sorted. :)

 

One more thing I did notice (and changed in the posted version), is this line:

 

 (action_tile "sFN"                                                           ;When action_tile sFN is selected
  "(setq IMG $value)                                                          ;Set variable IMG ~ (Image) to list value
   (itoa 0)                                                                   ;Return the conversion of an integer into a string 
   (OLC_UFI)"                                                                 ;Go to OLC_UFI Image Function
 )  

 

What is the purpose of the (itoa 0)?

 

Lee,

That has remained the same. I may have made somevariable changes.

 

(itoa 0) It returns the conversion of an integer into a string.

It is the opposite of atoi. I am suprised you are asking me that?

 

And yes thanks to your help this one got put to bed soon.

I wished I could have gone to bed sooner.

I did not think that this code was going to be a problem.

I figured with the standard formulas that this one was cut & dry.

Then comes the imaginary numbers.

I must of been imaginning things.

 

Was I wrong.

Anyway you know as well as I the learning benefits of this stuff.

You have get past the pain in order to gain.

 

Thank again Lee

Link to comment
Share on other sites

(itoa 0) It returns the conversion of an integer into a string.

It is the opposite of atoi. I am suprised you are asking me that?

 

Of course I know what itoa does, but why do have you included it in your code. It is not doing anything.

Link to comment
Share on other sites

Of course I know what itoa does, but why do have you included it in your code. It is not doing anything.

 

Its changing the image.

Link to comment
Share on other sites

You are setting a variable "IMG" to the value of the tile:

 

(setq IMG $value)

then invoking your program to change the image, based on the value of this variable.

 

The (itoa 0) is not doing anything.

Link to comment
Share on other sites

You are setting a variable "IMG" to the value of the tile:

 

(setq IMG $value)

then invoking your program to change the image, based on the value of this variable.

 

The (itoa 0) is not doing anything.

 

 

Would you please explain?

Link to comment
Share on other sites

Not keeping up with all the thread talk but I updated My version 4 with changed to the DCL file

and lisp. The functions have been Incorporated to keep variables local and some variables renamed.

Link to comment
Share on other sites

Would you please explain?

 

Your right, I just tested it and it doing nothing.

I will clean it up later.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...