MATLAB ヘルプ センター
近似オプションの構造体のプロパティの名前と値を取得する
get(options)
s = get(options)
value = get(options,field)
get(options) は、近似オプションの構造体 options のすべてのプロパティの名前と値を表示します。
options
s = get(options) は、近似オプションの構造体 options のコピーを構造体 s として返します。
s
value = get(options,field) は、近似オプションの構造体 options のプロパティ field の値を返します。field は文字ベクトルの cell 配列となる場合があり、その場合は、value も cell 配列です。
value
field
例
すべて折りたたむ
get
構造体 fitoptions を作成し、関数 get を呼び出してそのプロパティ値を取得します。
fitoptions
options = fitoptions('fourier1'); methodOptions = get(options,'Method') maxIterOptions = get(options,'MaxIter') set(options,'Maxiter',1e3); maxIterOptions = get(options,'MaxIter')
methodOptions = 'NonlinearLeastSquares' maxIterOptions = 400 maxIterOptions = 1000
プロパティ値は、ドット表記を使用して参照し、割り当てることもできます。以下に例を示します。
options.MaxIter
ans = 1000
options.MaxIter = 500; options.MaxIter
ans = 500
プロパティの名前と値を取得する fitoptions オブジェクト。fitoptions オブジェクトとして指定します。
取得する fitoptions オブジェクト options のプロパティ値。string スカラー、文字ベクトル、または文字ベクトルの cell 配列として指定します。
データ型: char | string | cell
char
string
cell
fitoptions オブジェクトのコピー。fitoptions オブジェクトとして返されます。
fitoptions オブジェクト s のプロパティ値。スカラー、ベクトル、行列、または cell として返されます。
R2006a より前に導入
fitoptions | set
set
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
ヨーロッパ
アジア太平洋地域
最寄りの営業オフィスへのお問い合わせ