LoginSignup
0
0

More than 5 years have passed since last update.

Octave > (x.^2)の"." > ないとエラー > error: for A^b, A must be a square matrix. Use .^ for elementwise power.

Posted at
動作環境
ideone > Octave (octave 4.0.3)

https://github.com/gradywright/spherepts/blob/master/code/getIcosNodes.m
にあるコード(下記)の"."はどういう意味なのか。

x_l2=sqrt(sum(x.^2,2));

ideoneで試した。

x = [ 1 2 3 ];
(x.^2)
(x^2)
stderr
error: for A^b, A must be a square matrix. Use .^ for elementwise power.

ドットがないとエラーになるようだ。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0