Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = [1]
- y = abs(sin(x)./x)+sin(1./x)
- numer_iteracji = 2
- czy_jest_pierwszy_raz = 1
- while y(end)>0.001
- x = [x, numer_iteracji]
- y = abs(sin(x)./x)+sin(1./x)
- numer_iteracji = numer_iteracji + 1
- if y(end) < 0.1 & czy_jest_pierwszy_raz
- a = input('Contynuowac?','s')
- if strcmp(a,'tak') % a == 'tak'
- czy_jest_pierwszy_raz = 0
- else
- break
- end
- end
- end
- plot(x,y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement