Octave/MATLABコードとは? わかりやすく解説

Weblio 辞書 > 辞書・百科事典 > ウィキペディア小見出し辞書 > Octave/MATLABコードの意味・解説 

Octave/MATLABコード

出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2020/10/02 16:40 UTC 版)

池田写像」の記事における「Octave/MATLABコード」の解説

このプロット生成するOctave/MATLABコードを以下に示す。 % u = ikeda parameter% option = what to plot% 'trajectory' - plot trajectory of random starting points% 'limit' - plot the last few iterations of random starting pointsfunction ikeda(u, option) P = 200;%how many starting points N = 1000;%how many iterations Nlimit = 20; %plot these many last points for 'limit' option x = randn(1,P)*10;%the random starting points y = randn(1,P)*10; for n=1:P, X = compute_ikeda_trajectory(u, x(n), y(n), N); switch option case 'trajectory' %plot the trajectories of a bunch of points plot_ikeda_trajectory(X);hold on; case 'limit' plot_limit(X, Nlimit); hold on; otherwise disp('Not implemented'); end end axis tight; axis equal text(-25,-15,['u = ' num2str(u)]); text(-25,-18,['N = ' num2str(N) ' iterations']); end % Plot the last n points of the curve - to see end point or limit cycle function plot_limit(X,n) plot(X(end-n:end,1),X(end-n:end,2),'ko');end% Plot the whole trajectoryfunction plot_ikeda_trajectory(X) plot(X(:,1),X(:,2),'k'); %hold on; plot(X(1,1),X(1,2),'bo','markerfacecolor','g'); hold offend%u is the ikeda parameter%x,y is the starting point%N is the number of iterationsfunction [X] = compute_ikeda_trajectory(u, x, y, N) X = zeros(N,2); X(1,:) = [x y]; for n = 2:N t = 0.4 - 6/(1 + x^2 + y^2); x1 = 1 + u*(x*cos(t) - y*sin(t)) ; y1 = u*(x*sin(t) + y*cos(t)) ; x = x1; y = y1; X(n,:) = [x y]; endend

※この「Octave/MATLABコード」の解説は、「池田写像」の解説の一部です。
「Octave/MATLABコード」を含む「池田写像」の記事については、「池田写像」の概要を参照ください。

ウィキペディア小見出し辞書の「Octave/MATLABコード」の項目はプログラムで機械的に意味や本文を生成しているため、不適切な項目が含まれていることもあります。ご了承くださいませ。 お問い合わせ



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「Octave/MATLABコード」の関連用語

1
32% |||||

Octave/MATLABコードのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Octave/MATLABコードのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
ウィキペディアウィキペディア
Text is available under GNU Free Documentation License (GFDL).
Weblio辞書に掲載されている「ウィキペディア小見出し辞書」の記事は、Wikipediaの池田写像 (改訂履歴)の記事を複製、再配布したものにあたり、GNU Free Documentation Licenseというライセンスの下で提供されています。

©2025 GRAS Group, Inc.RSS