would like to program the xy coordinate system.
Is there really is not to implement a general formula for the calculation of the window,
and this in a general function ?.
The intention is to have on this x y axis the curve drawing which is generated with the
function eg the uc (t) and i (t) for charging a capacitor via a resistor or
another application.
I don't find any general formula for calculation the window.
It is not supposed to have to rewrite all my code but some parts where I stuck .
The problem is always that I never see a curve.
My question are:
1) Can here someone once in a general formula a function items for the calculation of the window range?
2) How do I draw the lines with the values of the x and y axis ?.
As x axis is time axis , and this is then divided into lines , and there are then placed on the values for the same y  axis
Refer to the figure of the xy axis on the zero line
How can I charge and discharge current and capacitor voltage to graphically
visible as and curve. How should I calculate for that is always crashes .
Like a general formula to calculate the points .
Like using ddt statements. The user enters the parameters calculated
in the program and draws and i(t) and uc(t).
Howto : program for charge and discharge an capacitor across an resistor with an voltage source?

 Newbie
 Posts: 1
 Joined: Wed Mar 16, 2016 8:24 am
 burger2227
 Veteran
 Posts: 2180
 Joined: Mon Aug 21, 2006 12:40 am
 Location: Pittsburgh, PA
Re: Howto : program for charge and discharge an capacitor across an resistor with an voltage source?
You cannot draw LINE's in SCREEN 0, the default. Try SCREEN 12 or 13.
12 is values of x from 0 to 640 (columns from left to right) and 0 to 480 values of y (rows from top down)
To plot a graph, take values of x and y and use LINE(x1, y1)(x2, y2), 12 '12 is color red
You could put the values into an array and use a loop to read it later.
12 is values of x from 0 to 640 (columns from left to right) and 0 to 480 values of y (rows from top down)
To plot a graph, take values of x and y and use LINE(x1, y1)(x2, y2), 12 '12 is color red
You could put the values into an array and use a loop to read it later.
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : http://www.QB64.NET
Get my QBasics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : http://www.QB64.NET
Get my QBasics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0