So let me start by stating I'm really new to Mathematica.
Being a biologist..
I'm trying to make two different loops.
And I've been googling around and looking at some youtube video.
But, I'm getting a bit stressed out so;
I'm trying to make a sine loop and a "special" sine function---where the later one is a big struggle in how to implement it to Mathematica.
For the sine loop my logical thought is;
t==0; while t< Ssk1 do t+0.0001; if t>Skk1 stop; then do t-0.0001; until t==0; then do t+0.0001; where Ssk1==0.02675
I would get a sinus loop, right?
The purpose of the special function is to have a break. Where nothing happens. So here my thinking is;
t==0.00001;
.
while t<Ssk1 do t+0.00001; if t>=0 then do nothing for 300; then do t+0.00001
My issue is putting it in Mathematica language. I just can't. I think some simple examples of reasoning will get me going.
And I do apologies if this is a bad or stupid question. Sorry.
ssk1 = 0.02675; up1 = Table[t, {t, 0, ssk1, .0001}]; down1 = Table[t, {t, ssk1, 0, -.0001}]; up2 = Table[t, {t, 0, ssk1, .0001}]; down2 = Table[t, {t, ssk1, 0, -.0001}]; ListPlot[Join[up1, down1, up2, down2]]
. There are better ways to code this but I wanted to make it as close to your pseudocode as possible, so it would be easier to follow. $\endgroup$