Error in rescale (line 36) [A, a, b, inputMin, inputMax] = preprocessInputs(A, varargin{:}); Error in kc (line 36) out_images(:,:,:,i) = uint8(resc​ale(C(idx,​:),[size(a​,1)

[User posted source for 2017 version of MATLAB's rescale() function]

1 件のコメント

Walter Roberson
Walter Roberson 2022 年 11 月 6 日
Please do not post Mathworks source code: it is prioprietary.

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2022 年 11 月 6 日
Unfortunately you do not show us the source code of the call you are making to rescale()
However when we look at the error message, the code fragment is there,
out_images(:,:,:,i) = uint8(rescale(C(idx,:),[size(a,1)
The [ there gives us reason to believe that you probably passed a vector as the second parameter to rescale(). rescale() does not accept a vector as the second parameter. The syntax is not
rescale(DATA, [NewMinima, NewMaxima])
the syntax is
rescale(DATA, NewMinima, NewMaxima)

カテゴリ

ヘルプ センター および File ExchangeProgramming についてさらに検索

タグ

質問済み:

2022 年 11 月 6 日

回答済み:

2022 年 11 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by