%% Problem Set #1 % Date: 09/22/08 %% Please return your homework in a .m file which can be run %% 1. Perform the following computations % a. 5+4 % b. 2/4 % c. 3%2 % d. 9*2 % e. (8+12)/8 % f. create a vector of 100 1s and add 2 to each element % g. create a vector of 100 1s and have each subsequent element be 2 times % the previous one %% 2. Larmor Frequency % What is the Larmor precession frequency of... % a. 15N at 3T % b. 29Si at 1.5T % c. 1H at 400 Gauss % d. 1H at the earth's magnetic field (approximately) %% 3. Exponential Decay %%% a. Simulate and plot an exponential decay with a time constant T2 = 100 %%% ms. %%% b. Simulate and plot a signal which decays with two time constants %%% T2_fast = 10 ms and T2_slow = 100 ms. %% 4. Frequencies %%% Hint:: be sure to use complex signals %%% a. Simulate and plot 10 periods of a signal with a frequency 100 Hz. %%% b. Simulate and plot 10 periods of a signal with two frequencies 10 Hz %%% and -750 Hz. %%% c. Simulate and plot (4b) again, but with a signal to noise ratio = 20. %%% Hint::: signal-to-noise ratio = SNR = max signal divided by noise %%% magnitude. You will need to simulate and add noise to the plot. %%% d. Take the FFT of the signal you created in (4c) and display the %%% result with a proper frequency axis. %% 5. Resonance %%% Resonances are the fundamentals of nuclear magnetic resonance. %%% To simulate a resonance, we will need to know the %%% frequency at which a nuclei is precessing (Larmor frequency). %%% In addition, the resonances usually have associated time constants, so %%% that if we make a measurement, the signal will decay exponentially to %%% zero in a time T2 (usually on the order of ms or s). %%% Using your knowledge of exponential decay and complex signals %%% from problems 3 and 4, simulate an NMR spectra with the %%% following resonance. Display the time domain signal adjacent to this. %%% v1 = -400 Hz, a1 = 1; T2 = 100 ms %%% v2 = 500 Hz, a2 = 2; T2 = 10 ms %%% v3 = 1000 Hz, a3 = 1.5, T2 = 100 ms %%% Be sure to add some noise, so that it is properly faked! %% 6. Statistics %%% Using the find() command... %%% What is the approx. probability that a normally distributed random %%% variable with unit standard deviation falls between 0.2 and 0.4? %%% (HINT - what did "whos" tell us?)