לדלג לתוכן

קובץ:Linear least squares example.png

תוכן הדף אינו נתמך בשפות אחרות.
מתוך ויקיפדיה, האנציקלופדיה החופשית

Linear_least_squares_example.png(428 × 526 פיקסלים, גודל הקובץ: 12 ק"ב, סוג MIME‏: image/png)

ויקישיתוף זהו קובץ שמקורו במיזם ויקישיתוף. תיאורו בדף תיאור הקובץ המקורי (בעברית) מוצג למטה.
תיאור Illustration of linear least squares.
תאריך יצירה (UTC)
מקור self-made with MATLAB
יוצר Oleg Alexandrov
 
. MATLAB עם‎‎ נוצרה ה PNG תמונת מפת סיביות
Public domain ברצוני, בעלי זכויות היוצרים על יצירה זו, לשחרר יצירה זו לנחלת הכלל. זה תקף בכל העולם.
יש מדינות שבהן הדבר אינו אפשרי על פי חוק, אם כך:
אני מעניק לכל אחד את הזכות להשתמש בעבודה זו לכל מטרה שהיא, ללא תנאים כלשהם, אלא אם כן תנאים כאלה נדרשים על פי חוק.

Source code (MATLAB)

% Illustration of linear least squares.
function main()
 
   % KSmrq's colors
   red    = [0.867 0.06 0.14];
   blue   = [0, 129, 205]/256;
   green  = [0, 200,  70]/256;
   yellow = [254, 194,   0]/256;
   white = 0.99*[1, 1, 1];
   gray = 0.1*white;
 
% Set up the grid and other parameters
   Xr = [-1, 0, 2, 4];
   Yr = [3   6  8  9];
   
   N = 100;
   small = 0.2;
   X = linspace(min(Xr)-4*small, max(Xr)+4*small, N);
   C=-4; D = 4;
 
   % Set up the figure
   lw = 5; % linewidth
   lw2 = lw/2;
   fs = 22; % font size
   figure(1); clf; hold on;
   set(gca, 'fontsize', fs);
   set(gca, 'linewidth', lw2)
   hold on; grid on;
 
   % random numbers
   s=0.16;
   a = 1.2; b = 3; c = 1;
   p = 1; q = 6.5; r = 1.3;
   M = 50;
   p = s*p; q = s*q; r = s*r;

   myrad = 0.1;
   for i=1:length(Xr)
      ball(Xr(i), Yr(i), myrad, red);
   end

   axis equal;
 
 
   % least squares fitting
   Yr = Yr';
   Xr=Xr';
   Mat = [(0*Xr+1) Xr];
   V=Mat'*Yr;
   V=(Mat'*Mat)\V;
   pe = V(1); qe = V(2);
   
   plot(X, pe+qe*X, 'b', 'linewidth', lw);
 
   grid on;
   set(gca, 'GridLineStyle', '-', 'xcolor', gray);
   set(gca, 'GridLineStyle', '-', 'ycolor', gray);
   set(gca, 'XTick', min(Xr):1:max(Xr));
 
   axis equal;
   axis([min(Xr)-2*small max(Xr)+2*small min(Yr)-2*small max(Yr)+4*small]);
 
   saveas(gcf, 'Linear_least_squares_example.eps', 'psc2'); % save as eps
 
 
function ball(x, y, r, color)
   Theta=0:0.1:2*pi;
   X=r*cos(Theta)+x;
   Y=r*sin(Theta)+y;
   H=fill(X, Y, color);
   set(H, 'EdgeColor', 'none')
יש ליצור מחדש את התמונה math הזו באמצעות גרפיקה וקטורית כדוגמת קובץ SVG. לפעולה זו מספר יתרונות, כפי שניתן לקרוא (באנגלית) בדף Commons:Media for cleanup. אם ברשותכם קובץ SVG, אנא העלו אותו. לאחר מכן, החליפו תבנית זו בתבנית
{{vector version available|שם הקובץ.svg}}

כיתובים

נא להוסיף משפט שמסביר מה הקובץ מייצג

פריטים שמוצגים בקובץ הזה

מוצג

היסטוריית הקובץ

ניתן ללחוץ על תאריך/שעה כדי לראות את הקובץ כפי שנראה באותו זמן.

תאריך/שעהתמונה ממוזערתממדיםמשתמשהערה
נוכחית08:30, 22 במאי 2008תמונה ממוזערת לגרסה מ־08:30, 22 במאי 2008‪526 × 428‬ (12 ק"ב)Oleg Alexandrov{{Information |Description=Illustration of linear least squares. |Source=self-made with MATLAB |Date=~~~~~ |Author= Oleg Alexandrov |Permission=See below |other_versions= }} {{PD-self}} ==Source code

אין בוויקיפדיה דפים המשתמשים בקובץ זה.