added first input requests
This commit is contained in:
		
							parent
							
								
									a139d10bf6
								
							
						
					
					
						commit
						16a0b198f6
					
				
							
								
								
									
										27
									
								
								EPR_script.m
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								EPR_script.m
									
									
									
									
									
								
							| @ -1,28 +1,27 @@ | ||||
| % high-spin S=1 simulation | ||||
| % Go through the script line by line. Every "return" stops it. | ||||
| % 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. | ||||
| % Inputs requested in command line at certain points | ||||
| 
 | ||||
| clear all | ||||
| clear variables | ||||
| close all | ||||
| 
 | ||||
| %% 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 | ||||
| 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(Data) | ||||
| % return | ||||
| plot(Data) | ||||
| title('raw data') | ||||
| 
 | ||||
|  % substract the pre-trigger. Check how many points from the plot above | ||||
| signal_baseline_field = bsxfun(@minus, Data, mean(Data(1:1100,:))); | ||||
| % plot(signal_baseline_field) % plot the corrected data set | ||||
| % return | ||||
| % substract the pre-trigger | ||||
| pre_trigger = input('Number of pre-trigger points: '); | ||||
| signal_baseline_field = bsxfun(@minus, Data, mean(Data(1:pre_trigger,:))); | ||||
| 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(signal_baseline_field') | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user