Redian新闻
>
刚学编程,ascii老出错,求助
avatar
刚学编程,ascii老出错,求助# JobHunting - 待字闺中
p*y
1
0基础,刚刚上Andrew的machine learning,第一次写作业,在textedit上填code,然
后octave 跑一下,结果逗号的地方老说我错了,google了一整天原因,都找不出来,
我直接从别的地方拷贝逗号过来,也还是出错。整个周末都在折腾这个逗号,学习的热
情被打击得好惨啊。。。忘说了,我用的是苹果的电脑,已经把textedit上的所有的
smart substitutions功能都关了
parse error near line 19 of file /Users/Susan/Dropbox/Machine Learning/
machine-learning-ex1/ex1/plotData.m
syntax error
>>> plot(x,y,'rx’,'MarkerSize',10);
^
error: called from:
error: /Users/Susan/Dropbox/Machine Learning/machine-learning-ex1/ex1/ex1.
m at line 47, column 1
octave:3>
avatar
d*t
2
rx右边单引号
avatar
B*a
3
遇到这种情况,先自己手打一遍再说
avatar
h*n
4
你是不是有中文的软件?有时候会自动跳到中文软件上,然后这种中文引号之类看上去
很像,但程序读不出来。
avatar
c*n
5
,'rx’
avatar
p*y
6
我是有中文,但是在textedit写代码的时候,我关掉了,ascii出错的时候,我还特地
留意了一下,之前说是我的单引号错了,网上放狗搜,说把smart substitution关了,
后来(就是上面出错的地方)说是我的逗号错了。。。
我到现在也没研究出来逗号怎么个错法。可是我从网上copy 别人的代码放进去,就不
会出错

【在 h***n 的大作中提到】
: 你是不是有中文的软件?有时候会自动跳到中文软件上,然后这种中文引号之类看上去
: 很像,但程序读不出来。

avatar
l*u
7
就是敲中文了,看起来应该很明显的
avatar
p*y
8
okay. Just removed Pinyin input from the computer
But still not working:
X' (the one I typed) and X'(the one I copied)
Don't know why.... I don't have Pinyin input on the computer and disabled
smart substitution. Why does it make it so hard for me to learn coding????

【在 l****u 的大作中提到】
: 就是敲中文了,看起来应该很明显的
avatar
s*e
9
figure; % open a new figure window
plot(x, y, 'rx', 'MarkerSize', 10); % Plot the data
ylabel('Profit in $10,000s'); % Set the y-axis label
xlabel('Population of City in 10,000s'); % Set the x-axis label
avatar
l*o
10
编程要用windows!

【在 p********y 的大作中提到】
: 0基础,刚刚上Andrew的machine learning,第一次写作业,在textedit上填code,然
: 后octave 跑一下,结果逗号的地方老说我错了,google了一整天原因,都找不出来,
: 我直接从别的地方拷贝逗号过来,也还是出错。整个周末都在折腾这个逗号,学习的热
: 情被打击得好惨啊。。。忘说了,我用的是苹果的电脑,已经把textedit上的所有的
: smart substitutions功能都关了
: parse error near line 19 of file /Users/Susan/Dropbox/Machine Learning/
: machine-learning-ex1/ex1/plotData.m
: syntax error
: >>> plot(x,y,'rx’,'MarkerSize',10);
: ^

avatar
p*y
11
Thanks. But the error is caused by my ascii. I have removed Pinyin input
from the computer. But the error did not go away.
Do you think if I should use word pad instead of textedit to avoid ascii
error?

【在 s********e 的大作中提到】
: figure; % open a new figure window
: plot(x, y, 'rx', 'MarkerSize', 10); % Plot the data
: ylabel('Profit in $10,000s'); % Set the y-axis label
: xlabel('Population of City in 10,000s'); % Set the x-axis label

avatar
p*y
12
I am using my 8-year old Macbook.... don't have budget to buy a new laptop
this year...

【在 l*********o 的大作中提到】
: 编程要用windows!
avatar
g*i
13
mac的texteditor是rich text,
既然学就不能用点心?好歹用个sublime也比这强
你非要觉得自己是dennis ritchie,就把texteditor的save encoding改为ascii
avatar
H*l
14
请问为什么?听我会写编程的朋友说facebook的编程的员工都是发mac

【在 l*********o 的大作中提到】
: 编程要用windows!
avatar
h*n
15
没钱的话,去买个二手的,另外,不一定非用mac的,windows也是可以的。我就是整个
学习的过程一直用得是windows。还有computer还是要买的powerful一点,你学的时候
学这个学那个,太差的computer东西装得一多,倒时候程序跑得很慢。

【在 p********y 的大作中提到】
: I am using my 8-year old Macbook.... don't have budget to buy a new laptop
: this year...

avatar
p*y
16
what is sublime? who is dennis ritchie? This is my 2nd week on Machine
Learning class, and my
1st homework. I didn't even know I was using textedit until last morning.
update: looks like sublime is not free. Any recommendation on free software?
Thank you
update2: found a free version of sublime. just installed. Thank you very
much for recommending Sublime.

【在 g***i 的大作中提到】
: mac的texteditor是rich text,
: 既然学就不能用点心?好歹用个sublime也比这强
: 你非要觉得自己是dennis ritchie,就把texteditor的save encoding改为ascii

avatar
p*y
17
Thanks. any recommendation on computer?

【在 h***n 的大作中提到】
: 没钱的话,去买个二手的,另外,不一定非用mac的,windows也是可以的。我就是整个
: 学习的过程一直用得是windows。还有computer还是要买的powerful一点,你学的时候
: 学这个学那个,太差的computer东西装得一多,倒时候程序跑得很慢。

avatar
p*n
18
sublime不需要钱,用没注册的版本一样用。我觉得还是要学会多用Google


: Thanks. any recommendation on computer?



【在 p********y 的大作中提到】
: Thanks. any recommendation on computer?
avatar
s*e
19
You can use the "vi" in the MAC terminal. For this learning course, it seems
Windows is better for running either Matlab/Octave.
avatar
l*o
20
高手用傻无所谓

【在 H****l 的大作中提到】
: 请问为什么?听我会写编程的朋友说facebook的编程的员工都是发mac
avatar
c*f
21
just use vi
avatar
c*t
22
Next question: how to exit vi...

【在 c******f 的大作中提到】
: just use vi
avatar
l*r
23
how to type text in vi.
avatar
x*e
24
re
他敲成逗号了

【在 d*******t 的大作中提到】
: rx右边单引号
avatar
a*r
25
建议你配副眼镜或者把字号调大些,这种错误一眼就能看出来了。

【在 p********y 的大作中提到】
: 0基础,刚刚上Andrew的machine learning,第一次写作业,在textedit上填code,然
: 后octave 跑一下,结果逗号的地方老说我错了,google了一整天原因,都找不出来,
: 我直接从别的地方拷贝逗号过来,也还是出错。整个周末都在折腾这个逗号,学习的热
: 情被打击得好惨啊。。。忘说了,我用的是苹果的电脑,已经把textedit上的所有的
: smart substitutions功能都关了
: parse error near line 19 of file /Users/Susan/Dropbox/Machine Learning/
: machine-learning-ex1/ex1/plotData.m
: syntax error
: >>> plot(x,y,'rx’,'MarkerSize',10);
: ^

avatar
t*b
26
Don't use vi if you really want to learn something, rather than vi itself.
avatar
K*n
27
一个引号,你们让楼主买了栋新房?
avatar
e*o
28
要我说,楼主学啥ml,先学学python,弄懂基本概念再说。
另外,下载 atom,或者 vs code 就够了。
avatar
c*c
29
vs code是个好东西
avatar
a*y
30
please stay away
avatar
s*s
31
多大年纪了啊?学编程怎么能直接从machine learning入手呢

【在 p********y 的大作中提到】
: 0基础,刚刚上Andrew的machine learning,第一次写作业,在textedit上填code,然
: 后octave 跑一下,结果逗号的地方老说我错了,google了一整天原因,都找不出来,
: 我直接从别的地方拷贝逗号过来,也还是出错。整个周末都在折腾这个逗号,学习的热
: 情被打击得好惨啊。。。忘说了,我用的是苹果的电脑,已经把textedit上的所有的
: smart substitutions功能都关了
: parse error near line 19 of file /Users/Susan/Dropbox/Machine Learning/
: machine-learning-ex1/ex1/plotData.m
: syntax error
: >>> plot(x,y,'rx’,'MarkerSize',10);
: ^

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。