sampling rate Matlab I have a rather strange but i thin interesting question. The idea is to gain a better understanding of sampling rate vs frequency shifting when playing audio. The idea is a little experiment: 

%synthetic example

T=1/(10*10^6);%period should be at least 1/(2*10^6Hz) =&gt; Nyquist freq if we want to be able to reproduce 10^5Hz max freq
x=0:T:1-T;

f=10^6;%frequency
y=sin(2*pi*f*x);

%i see visually that there is 11 samples constituting 1 period
%plot(y(1:11))
%plot(y(100:111))
%etc
nbPeriods=length(y)/11;%nbtotalsamples/nbsamplesOf1Period
%y contains 10^6 oscillations each of 11 samples
%therefore if i want to reproduce a 1Khz sound, I compute my sampling frequency :
% Fs = nbPeriods/10^3 

Fs=909.09;

a=audioplayer(y,Fs)

tic;
play(a)
toc;


my question is: is this reasoning correct? -> that Fs should be 909.09 to get a 1kHz sine wave from  f=10^6;y=sin(2*pifx); when played at Fs=909.09 and considering of course the x range i have taken?

EDIT:
following your answer would this (the comments!) be correct now:

clc;clear all;
%synthetic example

T=1/(10*10^6);%
x=0:T:1-T;%my sampling rate is 1/T= 10*10^6 =10MHz

f=10^6;%frequency
%y: as if i had 1 period T of a sampled signal (sampled at 10MHz)
y=sin(2*pi*f*x);%this signal has a freq of 1 MHz , according to 
%Nyquist Shannon sampling thm the MAX freq i could capture with 
%my sampling rate of 10MHz would be 5 MHz,
%so i am a bit below that with my 1MHz


%given that i want to create a 1KHz wave from y i must sample at
% (10*10^6 samples)/(10^3 samples)  = 10^4 10 KHz
%idea: cutting my 10M samples into chunks of 10^3 oscillations
Fs=10^4;

a=audioplayer(2*y,Fs/4)

tic;
play(a)
toc;


%indeed it plays now a sound that "sounds" like a reference 1KHz wave,
You reasoning is NOT correct. One period is 10 samples long, not 11. The 11th sample is the first sample of the 2nd period, not the last sample of the 1st period.

So originally you have


sample rate: 10 MHz
sine wave frequency: 1 MHz, which is 1/10th of the sample rate


If you want to get a 1 kHz sine wave you need to set the sample rate to 10 times 1 kHz, i.e. 10 kHz. If you play it back at a sample rate of 909 Hz, your resulting frequency would be 90.9 Hz.