how to plot graph from text data as shown in the image

조회 수: 1 (최근 30일)
sanjiv kumar
sanjiv kumar 2021년 3월 6일
편집: KALYAN ACHARJYA 2021년 3월 6일

채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2021년 3월 6일
편집: KALYAN ACHARJYA 2021년 3월 6일
Try this way in MATLAB edit window
%Load the file
A=readmatrix('file.txt');
Get the x and y values
x=A(:,1);
x=A(:,2);
Plot the x and y data
plot(x,y);
Before plotting make sure the lengths of x and y are the same length, if not the same length, then check the data arrangement format within the text file.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by