1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MATLAB > [v,~,idx] = unique(v,'rows'); > tilde(~):プレースホルダ > Pythonでの下線(_)に相当するのだろう

Last updated at Posted at 2017-11-23
動作環境
GeForce GTX 1070 (8GB)
ASRock Z170M Pro4S [Intel Z170chipset]
Ubuntu 16.04 LTS desktop amd64
TensorFlow v1.2.1
cuDNN v5.1 for Linux
CUDA v8.0
Python 3.5.2
IPython 6.0.0 -- An enhanced Interactive Python.
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)
scipy v0.19.1
geopandas v0.3.0
MATLAB R2017b (Home Edition)

MATLAB

[v,~,idx] = unique(v,'rows');

[C,ia,ic] = unique(A,'rows') は、C = A(ia,:) かつ A = C(ic,:) となるようなインデックス ベクトル ia および ic も返します。

tildeの方はどういう意味か。
https://jp.mathworks.com/help/matlab/matlab_prog/matlab-operators-and-special-characters.html

引数のプレースホルダー
...
チルダ記号を使用して、論理否定を表現したり、特定の出力引数の出力を抑制したりします。

Pythonでの以下のような書き方(_:下線)に相当するのだろう。

v, _, idx = 関数()

検索用キーワード

  • placeholder
1
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?