added first input requests
This commit is contained in:
		
							parent
							
								
									a139d10bf6
								
							
						
					
					
						commit
						16a0b198f6
					
				
							
								
								
									
										29
									
								
								EPR_script.m
									
									
									
									
									
								
							
							
						
						
									
										29
									
								
								EPR_script.m
									
									
									
									
									
								
							| @ -1,28 +1,27 @@ | |||||||
| % high-spin S=1 simulation | % high-spin S=1 simulation | ||||||
| % Go through the script line by line. Every "return" stops it. | % Inputs requested in command line at certain points | ||||||
| % When you have completed the task, comment out that "return" |  | ||||||
| % so the script runs to the next "return" |  | ||||||
| % An important part of your task is to understand the script. |  | ||||||
| % I will be asking you about this in the exam. |  | ||||||
| % This will be easier for those of you who attended the simulation session. |  | ||||||
| 
 | 
 | ||||||
| clear all | clear variables | ||||||
| close all | close all | ||||||
| 
 | 
 | ||||||
| %% Baseline Correcting | %% Baseline Correcting | ||||||
| load '..\..\Messdaten\TR_EPR\EMX_Aufbau\HU_F2\HU_F2_435nm.mat' % check this matches the name of your data file | % loading Data | ||||||
|  | path = input('Path to dataset: ','s'); | ||||||
|  | load(path) | ||||||
| 
 | 
 | ||||||
| whos % what variables have been loaded | whos % what variables have been loaded | ||||||
| params % what information is contained in the structure called 'params' | params % what information is contained in the structure called 'params' | ||||||
| 
 | 
 | ||||||
|  % plot the raw data & check the number of points before the signal (pre-trigger) | % plot the raw data & check the number of points before the signal (pre-trigger) | ||||||
| % plot(Data) | plot(Data) | ||||||
| % return | title('raw data') | ||||||
| 
 | 
 | ||||||
|  % substract the pre-trigger. Check how many points from the plot above | % substract the pre-trigger | ||||||
| signal_baseline_field = bsxfun(@minus, Data, mean(Data(1:1100,:))); | pre_trigger = input('Number of pre-trigger points: '); | ||||||
| % plot(signal_baseline_field) % plot the corrected data set | signal_baseline_field = bsxfun(@minus, Data, mean(Data(1:pre_trigger,:))); | ||||||
| % return | plot(signal_baseline_field) % plot the corrected data set | ||||||
|  | title('corrected data') | ||||||
|  | return | ||||||
| 
 | 
 | ||||||
|  % plot the transpose and check the number of points to the lower and higher fields of the signal |  % plot the transpose and check the number of points to the lower and higher fields of the signal | ||||||
| % plot(signal_baseline_field') | % plot(signal_baseline_field') | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user