Vec:: In Windows Version But Not in Linux?

9 ビュー (過去 30 日間)
Mark Stone
Mark Stone 2014 年 1 月 24 日
回答済み: Mark Stone 2014 年 1 月 24 日
The vec "operator", which reehspes a matrix into a vector by stacking its columns, and is widely using in books and papers on advanced matrix and tensor analysis, seems to be present in MATLAB R2013A and R2013B for WINDOWS, but not in R2013A for LINUX, although I'm not sure whether it might perhaps be lurking outside of the the core MATLAB somewhere in the WINDOWS version. Can someone please clarify the situation? Even though reshape can be used in lieu of vec, why lose backward compatibility?
Thanks.

採用された回答

Walter Roberson
Walter Roberson 2014 年 1 月 24 日
vec() is not supplied by Mathworks in any version.
On one of the systems where it works, please use
which -all vec
and show us the result. That will give us an idea of where it came from.
My speculation is that you have downloaded a third-party package on some of the machines but not all of them.

その他の回答 (1 件)

Mark Stone
Mark Stone 2014 年 1 月 24 日
Walter, thanks for that pointer. vec is a function in CVX, and also in the sedumi solver, which in included with CVX, as well as separately. I must have noticed the missing "vec" when I had not yet installed CVX and sedumi under LINUX, and indeed, it is "there" now.
It's a handy little function, and by all rights, MATLAB should have included it as part of the core language.

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by