+ 1
it would be better to do it in while loop! make sure import math libraries and just like: double x0=1, dx=0.05, xn=2,x=x0,v; while (x=<xn){ v=10*x + sin(abs(x-6.25)); x+=dx; } for loop: double x=0; for (int i=200; i=<400; i++){ x = i/200; v=10*x + sin(abs(x-6.25)); } If anything goes wrong let me know, because I didn't programmed in java for 5 years! Good luck!
22nd Nov 2017, 12:03 AM
Mohammad Nasouri
Mohammad Nasouri - avatar