meas is unrecognized, attempting to read in a file and plot data

조회 수: 13 (최근 30일)
Sunshine
Sunshine 2020년 11월 2일
답변: Mathieu NOE 2020년 11월 6일
I am attempting to follow https://www.mathworks.com/help/stats/clustering-using-gaussian-mixture-models.html with my own data. My data is x values (10 rows of double numbers) and y values (2 columns of double numbers). So I have this...
load p2-data
X = meas(:,1:2)
[n,p] = size(X)
plot(X(:,1),X(:,2),'k*','MarkerSize',15)
title('test')
xlabel('x points')
ylabel('y points')
However, I get the error: Unrecognized function or variable 'meas'
when running the above code. I am using R2020b. meas does seem to be a function. What am I doing wrong?
  댓글 수: 10
RenatoL
RenatoL 2020년 11월 6일
Mathieu wrote the solution here, which is the comments section. I suggest Mathieu put his answer properly so that Sunshine can accept it.
Mathieu NOE
Mathieu NOE 2020년 11월 6일
hi
will do immediately ! tx

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

채택된 답변

Mathieu NOE
Mathieu NOE 2020년 11월 6일
so the answer is :
you are attempting to plot a variable (meas) that does not exist in your workspace
when you load your file, the data name is p2_data and not meas
so you have to correct : X = p2_data(:,1:2)
enjoy !

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by