How can I make data non-dimensionalised with XY Plot data file?
    조회 수: 7 (최근 30일)
  
       이전 댓글 표시
    
I have a lot of data in an XY Plot file and I need to divide all the data that is to be plotted along the x-axis by 0.3855 and need to multiply all the data to be plotted along the y axis by -1. Can anyone help me write some code? I presume it is quite simple but any help would be hugely appreciated.
Thank you
댓글 수: 0
답변 (1개)
  nick
      
 2025년 4월 14일
        Hello Matt,
You can use rdivide and rmultiply operations for linear scaling of the data, as shown:
data = load('your_data_file.txt'); 
% Separate the data into x and y components
x_data = data(:, 1); 
y_data = data(:, 2); 
% Transform the data
x_transformed = x_data / 0.3855;
y_transformed = y_data * -1;
You can refer to the following documentation to know more about array and matrix operations :
댓글 수: 0
참고 항목
카테고리
				Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

