Recent content by joseph2015
-
J
Python How to Plot y=x^2 Using Matplotlib?
Thank you very much for your replies and helps- joseph2015
- Post #7
- Forum: Programming and Computer Science
-
J
Python How to Plot y=x^2 Using Matplotlib?
Thanks for your reply. However, it will produce points even if i used line code lines. Joe- joseph2015
- Post #3
- Forum: Programming and Computer Science
-
J
Python How to Plot y=x^2 Using Matplotlib?
import matplotlib.pyplot as plt R = 2 for x in range(0,50): y = x**R # plt.plot(x,y,marker = 'o') plt.plot(x,y,'--') plt.xlabel('X-axis') plt.ylabel('Y-axis') plt.title('plot test') plt.legend() plt.show()- joseph2015
- Thread
- Matplotlib Plotting
- Replies: 6
- Forum: Programming and Computer Science
-
J
Fortran Fortran subroutine solving for the velocity and displacement of a spring
The reason I am looking to understand how to put it in the subroutine, is I am looking to learn how to build larger code in the future and use makefiles to compile. In terms of how fast i can't tell for now as they both run in a blink- joseph2015
- Post #9
- Forum: Programming and Computer Science
-
J
Fortran Fortran subroutine solving for the velocity and displacement of a spring
Dear FactChecker the following is the corrected version that works with your helps :), Thanks ====================================================================== program msd implicit none real, parameter :: tstop=100. integer i real, dimension(2000) :: t,y,v open (2, file = "test.txt")...- joseph2015
- Post #6
- Forum: Programming and Computer Science
-
J
Fortran Fortran subroutine solving for the velocity and displacement of a spring
Thank you very much jtbell and FactChecker, the issue was not passing i. I really appreciate your help.- joseph2015
- Post #4
- Forum: Programming and Computer Science
-
J
Fortran Fortran subroutine solving for the velocity and displacement of a spring
I have a simple Fortran code for solving velocity and displacement of spring, the code works fine when writing all together without using a subroutine. but as I am learning Fortran I tried to do it using subroutine, but I keep getting errors appreciate any help in advance. program msd implicit...- joseph2015
- Thread
- Displacement Fortran Spring Subroutine Velocity
- Replies: 8
- Forum: Programming and Computer Science
-
J
Comp Sci Help with solving first order ODE using a simple Fortran code, please
I will try that, thank you very much- joseph2015
- Post #5
- Forum: Engineering and Comp Sci Homework Help
-
J
Comp Sci Help with solving first order ODE using a simple Fortran code, please
Thank you very much for your answer I am trying to follow the change of s as a function of time and h, then plot s vs h. for example: if s is a strength of a material, while h is height (from 100 to 1cm), I would like to plot s vs h for 100 years time. Kind regards, Joseph- joseph2015
- Post #3
- Forum: Engineering and Comp Sci Homework Help
-
J
Comp Sci Help with solving first order ODE using a simple Fortran code, please
I am trying to solve the following first order ODE using a simple Fortran code : $$ ds/dt=k_i * \sqrt{v}$$ where both (ki) and (v) are variables depending on (h) as follows $$ k_i=\sqrt{χ/h^2}$$ $$v= \mu h$$ where (μ) and (χ) are constants. (the arbitrary values of each of them can be seen...- joseph2015
- Thread
- Code First order Fortran Ode
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
J
Fortran Physical time (years) in simulations
thank you very much.- joseph2015
- Post #10
- Forum: Programming and Computer Science
-
J
Fortran Physical time (years) in simulations
what these have to do with my question? I am really lost!- joseph2015
- Post #8
- Forum: Programming and Computer Science
-
J
Fortran Physical time (years) in simulations
Thank you very much, that helps a lot.- joseph2015
- Post #4
- Forum: Programming and Computer Science
-
J
Fortran Physical time (years) in simulations
Hello My name is Joseph I am a physics student, I am new to Fortran, I know how to write a code for solving differential equations, but now I have a physics equation for evolving star rotation as a function of mass. and I do not know how to evolve (using any numerical method, such as Euler) so...- joseph2015
- Thread
- Physical Simulations Time Years
- Replies: 9
- Forum: Programming and Computer Science