matheraum.de
Raum für Mathematik
Offene Informations- und Nachhilfegemeinschaft

Für Schüler, Studenten, Lehrer, Mathematik-Interessierte.
Hallo Gast!einloggen | registrieren ]
Startseite · Forum · Wissen · Kurse · Mitglieder · Team · Impressum
Forenbaum
^ Forenbaum
Status Mathe
  Status Schulmathe
    Status Primarstufe
    Status Mathe Klassen 5-7
    Status Mathe Klassen 8-10
    Status Oberstufenmathe
    Status Mathe-Wettbewerbe
    Status Sonstiges
  Status Hochschulmathe
    Status Uni-Analysis
    Status Uni-Lin. Algebra
    Status Algebra+Zahlentheo.
    Status Diskrete Mathematik
    Status Fachdidaktik
    Status Finanz+Versicherung
    Status Logik+Mengenlehre
    Status Numerik
    Status Uni-Stochastik
    Status Topologie+Geometrie
    Status Uni-Sonstiges
  Status Mathe-Vorkurse
    Status Organisatorisches
    Status Schule
    Status Universität
  Status Mathe-Software
    Status Derive
    Status DynaGeo
    Status FunkyPlot
    Status GeoGebra
    Status LaTeX
    Status Maple
    Status MathCad
    Status Mathematica
    Status Matlab
    Status Maxima
    Status MuPad
    Status Taschenrechner

Gezeigt werden alle Foren bis zur Tiefe 2

Navigation
 Startseite...
 Neuerdings beta neu
 Forum...
 vorwissen...
 vorkurse...
 Werkzeuge...
 Nachhilfevermittlung beta...
 Online-Spiele beta
 Suchen
 Verein...
 Impressum
Das Projekt
Server und Internetanbindung werden durch Spenden finanziert.
Organisiert wird das Projekt von unserem Koordinatorenteam.
Hunderte Mitglieder helfen ehrenamtlich in unseren moderierten Foren.
Anbieter der Seite ist der gemeinnützige Verein "Vorhilfe.de e.V.".
Partnerseiten
Dt. Schulen im Ausland: Mathe-Seiten:Weitere Fächer:

Open Source FunktionenplotterFunkyPlot: Kostenloser und quelloffener Funktionenplotter für Linux und andere Betriebssysteme
StartseiteMatheForenMatlabAnova1
Foren für weitere Schulfächer findest Du auf www.vorhilfe.de z.B. Deutsch • Englisch • Französisch • Latein • Spanisch • Russisch • Griechisch
Forum "Matlab" - Anova1
Anova1 < Matlab < Mathe-Software < Mathe < Vorhilfe
Ansicht: [ geschachtelt ] | ^ Forum "Matlab"  | ^^ Alle Foren  | ^ Forenbaum  | Materialien

Anova1: Frage (beantwortet)
Status: (Frage) beantwortet Status 
Datum: 08:48 Sa 16.06.2007
Autor: makabeli

Hallo,

ich soll ne Varianzanalyse mit Matlab machen, aber in den Daten die ich bekommen habe sind NaN drin, wie geh ich denn damit um?

        
Bezug
Anova1: Antwort
Status: (Antwort) fertig Status 
Datum: 18:09 Sa 16.06.2007
Autor: BKM

Hallo.

Ich könnte mir vorstellen, dass dieses Programm bei den fehlenden Daten helfen kann. Ansonsten einfach an die Gegebenheiten  anpassen.

Beste Grüße.

% Program to compute a covariance matrix ignoring NaNs
% Usage: C = nancov(A,B)
% NANCOV calculates the matrix product A*B ignoring NaNs by replacing them
% with zeros, and then normalizing each element C(i,j) by the number of
% non-NaN values in the vector product A(i,:)*B(:,j).
%
% A - left hand matrix to be multiplied
% B - right hand matrix to be multiplied
% C - resultant covariance matrix
% Example: A = [1 NaN 1] , B = [1
%                               1
%                               1]
% then nancov(A,B) is 2/2 = 1

function [C]=nancov(A,B);

NmatA=~isnan(A); % Counter matrix
NmatB=~isnan(B);

A(isnan(A))=0; % Replace NaNs in A,B, and counter matrices
B(isnan(B))=0; % with zeros

Npts=NmatA*NmatB;
C=(A*B)./Npts;

% NANEOF.M
% Function to compute EOFs from demeaned data with NaNs:
% function [B,vars,amps]=naneof(anom);
% Computes EOFs of ROW DIMENSION in anom matrix

function [B,vars,amps]=naneof(anom);

%-----------------------------------------------------------------------
% Compute covariance of matrix with NaNs
Cov=nancov(anom,anom');

%-----------------------------------------------------------------------
% Compute eigenvectors (EOFs), eigenvalues (variances of amplitudes) of
% data covariance matrix

[B,D]=eig(Cov);       % B = EOFs, diag(D) = eigenvalues
vars=flipud(diag(D)); % eigenvalues = variances of each amplitude

% EIG outputs from low to high, so flip column
% to order from high to low
B=fliplr(B);          % Flip columns left/right to correspond
                      % to adjusted ordering of amplitudes

%-----------------------------------------------------------------------
% Put 0's in for NaNs in ANOM matrix to be able to compute amplitudes

anom(isnan(anom))=0;
amps=B'*anom;          % amplitudes

%-----------------------------------------------------------------------


Bezug
Ansicht: [ geschachtelt ] | ^ Forum "Matlab"  | ^^ Alle Foren  | ^ Forenbaum  | Materialien


^ Seitenanfang ^
www.matheraum.de
[ Startseite | Forum | Wissen | Kurse | Mitglieder | Team | Impressum ]