I am trying to define an equation set, in which the function is very similar to a square wave, but instead, it is defined piecewise at each interval. Now I need to evaluate the equation at each interval with different parameters in it. my code is as below:
cur[tim_,R_]:= f{tim,R};
Plot[Table[Piecewise[{{cur[tim], tim < Pi}, {-cur[tim], Pi < tim < Pi}}],{R,1*10^6, 10*10^6, 1*10^6}], {tim, 0, 2 Pi}]
Can someone please help me how to solve this? the above code did not work. Your help is much appreciated.