linspace and colon with column vector output

4 ビュー (過去 30 日間)
Ilya
Ilya 2014 年 4 月 30 日
編集済み: Matt J 2014 年 5 月 1 日
Is it possible to generate column sample vectors by using either linspace()/logspace() or : - operator ?
The background is that I'm using extended precision calculations, and my inputs are also of an extended precision data type. The inputs are generated with linspace or colon, but transposing of symbolic/extended precision data (e.g. a=a.' or a=a(:)) is by far as not cheap as transposing some double data.
And reshaping of the output of linspace() or colon operator may be quite time consuming for double vectors of a large length.

回答 (1 件)

Matt J
Matt J 2014 年 5 月 1 日
編集済み: Matt J 2014 年 5 月 1 日
And reshaping of the output of linspace() or colon operator may be quite time consuming for double vectors of a large length.
Shouldn't be. No manipulation of the data is done when you transpose/reshape a vector. A simple change to the size(X) data in the underlying mxArray object is made.

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by