Flip every other file in a GPR matrix

조회 수: 2 (최근 30일)
William Wadsworth
William Wadsworth 2018년 5월 28일
댓글: Ameer Hamza 2018년 5월 28일
Hi all, I am an archaeology student learning matlab and need some help flipping some ground penetrating radar data (GSSI). We collect data in two directions. One line S->N, next line N->S. So need to figure out how to flip every other line.
Here is the code i've been messing around with so far. Dist is our y-axis data values. I keep getting an unequal expression error.
%Reverse Odd dist=-dist %alternatively could use fliplr? if radarfile=['../22-05-2018/FILE____1' '../22-05-2018/FILE____3' '../22-05-2018/FILE____5' '../22-05- 2018/FILE____7' '../22-05-2018/FILE____9', num2str(num),'.DZT']; end
any help would be greatly appreciated

채택된 답변

Ameer Hamza
Ameer Hamza 2018년 5월 28일
편집: Ameer Hamza 2018년 5월 28일
dist(1:2:end, :) = fliplr(dist(1:2:end, :))
dist(1:2:end, :) = dist(1:2:end, end:-1:1) % both have same result
this will flip row 1,3,5,... and
dist(2:2:end, :) = fliplr(dist(2:2:end, :))
dist(2:2:end, :) = dist(2:2:end, end:-1:1) % both have same result
will flip row 2,4,6,...
  댓글 수: 2
William Wadsworth
William Wadsworth 2018년 5월 28일
Worked like a charm! Thanks Ameer!
Ameer Hamza
Ameer Hamza 2018년 5월 28일
You are welcome.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by