How do I plot data in Octave?

I wanted to plot a data in Octave for a logistic regression problem my teacher in my university assigned me to solve. Let's say the input-training features is a matrix X and output is y=1 or y=0 To plot the data I made this statement:

pos = find(y==1);neg = find(y==0);

plot(X(pos,1),X(pos,2),’k+’,’LineWidth’,2,’MarkerSize’,7);

plot(X(neg,1),X(neg,2),’ko’,’MarkerFaceColor’,y,’MarkerSize’,7);

But it does not compile and it shows the single quotes as unidentified characters. Please help...

Topic octave

Category Data Science


I am not an Octave expert, but it seems that you answered your own question. The quotation marks that you posted in your question are indeed not "regular" quotation marks.

Fix these characters and your code should run smoothly.

Also, maybe I am being pedantic, but since Octave is an interpreted language, it doesn't technically "compile" anything.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.