필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Hi......how to create an image in Matlab from .txt file?

조회 수: 1 (최근 30일)
A-J KHAN
A-J KHAN 2018년 3월 13일
댓글: A-J KHAN 2018년 3월 13일
I have some .txt files containing 2 columns of number (x,y) of each point identified by the x,y coordinates. I should find a way to produce an image file (the format is not important, it may be a .jpg for example) in which the x, y coordinate are identified of the .txt file (x and y coordinates). How can I concert the coordinates into an image?
The sample is attached here..
Thanks!
  댓글 수: 1
A-J KHAN
A-J KHAN 2018년 3월 13일
data = importdata('data.txt') ; x = data(:,1) ; y = data(:,2) ; z = data(:,3) ; xi = unique(x) ; yi = unique(y) ; nx = length(xi) ; ny = length(yi) ; X = reshape(x,nx,ny) ; Y = reshape(y,nx,ny) ; Z = reshape(z,nx,ny) ; surf(X,Y,Z) ; view(2) shading interp axis tight saveas(gcf,'myfile.jpg')
I got some help but i still have problem to created image format

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by