WICHTIG: Der Betrieb von goMatlab.de wird privat finanziert fortgesetzt. - Mehr Infos...

Mein MATLAB Forum - goMatlab.de

Mein MATLAB Forum

 
Gast > Registrieren       Autologin?   

Partner:




Forum
      Option
[Erweitert]
  • Diese Seite per Mail weiterempfehlen
     


Gehe zu:  
Neues Thema eröffnen Neue Antwort erstellen

Stetigkeit,Monotonie

 

razer
Forum-Anfänger

Forum-Anfänger


Beiträge: 11
Anmeldedatum: 06.03.08
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 10.03.2008, 08:45     Titel: Stetigkeit,Monotonie
  Antworten mit Zitat      
Wie kann ich in Matlab überprüfen,dass die Werte eines Vektors monoton sinken?

grüße!
Private Nachricht senden Benutzer-Profile anzeigen


nschlange
Ehrenmitglied

Ehrenmitglied



Beiträge: 1.318
Anmeldedatum: 06.09.07
Wohnort: NRW
Version: R2007b
     Beitrag Verfasst am: 10.03.2008, 14:47     Titel:
  Antworten mit Zitat      
Hi,

Du könntest gucken, ob
Code:
überall kleiner oder gleich
0 ist.

Stetigkeit: keine Ahnung.

Vielleicht ist das eher was für die Symbolic Math Toolbox.
_________________

Viele Grüße
nschlange

"Chuck Norris ejakuliert fluessigen Stahl!"
Private Nachricht senden Benutzer-Profile anzeigen E-Mail senden
 
razeralsgast

Gast


Beiträge: ---
Anmeldedatum: ---
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 11.03.2008, 09:39     Titel:
  Antworten mit Zitat      
Hm ne,naja vl sollte ich mein Problem mal etwas konktretisieren:
Ich muss eigentlich den Vektor so überprüfen:
Code:
function [maxtab, mintab]=peakdet(v, delta)
%PEAKDET Detect peaks in a vector
%        [MAXTAB, MINTAB] = PEAKDET(V, DELTA) finds the local
%        maxima and minima ("peaks") in the vector V.
%        A point is considered a maximum peak if it has the maximal
%        value, and was preceded (to the left) by a value lower by
%        DELTA. MAXTAB and MINTAB consists of two columns. Column 1
%        contains indices in V, and column 2 the found values.

% Eli Billauer, 3.4.05 (Explicitly not copyrighted).
% This function is released to the public domain; Any use is allowed.

maxtab = [];
mintab = [];

v = v(:); % Just in case this wasn't a proper vector

if (length(delta(:)))>1
  error('Input argument DELTA must be a scalar');
end

if delta <= 0
  error('Input argument DELTA must be positive');
end

mn = Inf; mx = -Inf;
mnpos = NaN; mxpos = NaN;

lookformax = 1;

for i=1:length(v)
  this = v(i);
  if this > mx, mx = this; mxpos = i; end
  if this < mn, mn = this; mnpos = i; end
 
  if lookformax
    if this < mx-delta
      maxtab = [maxtab ; mxpos mx];
      mn = this; mnpos = i;
      lookformax = 0;
    end  
  else
    if this > mn+delta
      mintab = [mintab ; mnpos mn];
      mx = this; mxpos = i;
      lookformax = 1;
    end
  end
end
 


Naja,dann bekomm ich,wenn ich zB
Code:

y = randn(1,100);
 

nur die positiven peaks heraus...

Jemand ne idee,wie ich auch die auf der negativen Seite bekommen könnte?

[/b]
 
nschlange
Ehrenmitglied

Ehrenmitglied



Beiträge: 1.318
Anmeldedatum: 06.09.07
Wohnort: NRW
Version: R2007b
     Beitrag Verfasst am: 11.03.2008, 11:39     Titel:
  Antworten mit Zitat      
Hab mich mit dem Code nicht beschäftigt,
aber so geht es auch:
Code:
clear all;
clc;

x=1:1:100;
y=randn(1,numel(x));

plot(x,y);
hold on;

extr=sign(diff(y));
ind_extr=find(extr~=[extr(1) extr(1:end-1)]);
plot(x(ind_extr),y(ind_extr),'ro');
hold off;

_________________

Viele Grüße
nschlange

"Chuck Norris ejakuliert fluessigen Stahl!"
Private Nachricht senden Benutzer-Profile anzeigen E-Mail senden
 
Neues Thema eröffnen Neue Antwort erstellen



Einstellungen und Berechtigungen
Beiträge der letzten Zeit anzeigen:

Du kannst Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.
Du kannst Dateien in diesem Forum posten
Du kannst Dateien in diesem Forum herunterladen
.





 Impressum  | Nutzungsbedingungen  | Datenschutz | FAQ | goMatlab RSS Button RSS

Hosted by:


Copyright © 2007 - 2024 goMatlab.de | Dies ist keine offizielle Website der Firma The Mathworks

MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, and Embedded MATLAB are trademarks of The MathWorks, Inc.