קובץ:Linear least squares example2.png

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

לקובץ המקורי(1,245 × 1,569 פיקסלים, גודל הקובץ: 52 ק"ב, סוג MIME‏: image/png)

ויקישיתוף זהו קובץ שמקורו במיזם ויקישיתוף. תיאורו בדף תיאור הקובץ המקורי (בעברית) מוצג למטה.

תקציר

תיאור Illustration of linear least squares.
תאריך יצירה (UTC)
מקור self-made with MATLAB
יוצר Oleg Alexandrov
גרסאות אחרות
קיימת תמונה חדשה תמונה זו בגרסה וקטורית בפורמט "SVG". יש להחליף את התמונה הנוכחית בתמונה החדשה.

File:Linear least squares example2.png → File:Linear least squares example2.svg


בשפות אחרות
Alemannisch  Bahasa Indonesia  Bahasa Melayu  British English  català  čeština  dansk  Deutsch  eesti  English  español  Esperanto  euskara  français  Frysk  galego  hrvatski  Ido  italiano  lietuvių  magyar  Nederlands  norsk bokmål  norsk nynorsk  occitan  Plattdüütsch  polski  português  português do Brasil  română  Scots  sicilianu  slovenčina  slovenščina  suomi  svenska  Tiếng Việt  Türkçe  vèneto  Ελληνικά  беларуская (тарашкевіца)  български  македонски  нохчийн  русский  српски / srpski  татарча/tatarça  українська  ქართული  հայերեն  বাংলা  தமிழ்  മലയാളം  ไทย  한국어  日本語  简体中文  繁體中文  עברית  العربية  فارسی  +/−
New SVG image

 
. 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 100 0]/256;
   green=[0 139 0]/256;
   
   yellow = [254, 194,   0]/256;
   white = 0.99*[1, 1, 1];
   gray = 0.1*white;
 
   Xr = [1, 2, 3, 4];
   Yr = round(1+1.5*Xr+4*rand(1, 4))
   %Yr = [9  13  15 14];
   Yr = [6 5 7 10];
   
   A = min(Xr)-1; B = max(Xr)+1;
   C = min(Yr)-1; D = max(Yr)+1;
   N = 100;
   small = 0.2;
   X = linspace(A, B, N);
 
 
   % least squares fitting
   Yr = Yr';
   Xr=Xr';
   Mat = [(0*Xr+1) Xr];
   V=Mat'*Yr;
   V
   Mat
   V=(Mat'*Mat)\V;
   pe = V(1); qe = V(2);

   V
   
   % 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;
   axis equal;
 

   grid off;

   for i=1:length(Xr)
      plot([Xr(i), Xr(i)], [Yr(i) pe+qe*Xr(i)], 'color', green, 'linewidth', 0.95*lw);
   end

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

   plot(X, pe+qe*X, 'b', 'linewidth', lw);
   
   set(gca, 'GridLineStyle', '-', 'xcolor', gray);
   set(gca, 'GridLineStyle', '-', 'ycolor', gray);
   set(gca, 'XTick', A:1:B);
   set(gca, 'YTick', C:1:D);

   
   Yr - (pe+qe*Xr)
   
   axis equal;
   axis([A B C D]);
 
   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')

כיתובים

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

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

מוצג

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

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

תאריך/שעהתמונה ממוזערתממדיםמשתמשהערה
נוכחית22:51, 1 ביוני 2008תמונה ממוזערת לגרסה מ־22:51, 1 ביוני 2008‪1,569 × 1,245‬ (52 ק"ב)Oleg AlexandrovAdd x and y labels
07:12, 24 במאי 2008תמונה ממוזערת לגרסה מ־07:12, 24 במאי 2008‪1,476 × 1,199‬ (37 ק"ב)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

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

שימוש גלובלי בקובץ

אתרי הוויקי השונים הבאים משתמשים בקובץ זה: