Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Kann mir mal bitte jemand folgende Formel für Borland 5.0 übersetzen ??

U© = U * e [hoch] (- (t / (R*C)))

(kann in nächster Zeit sicherlich diese Hilfe öfter's gebrauchen :) )

Ist das ne physikalische Formel ? Mit den Variablen U (Strom), R (Widerstand) und C (Kapazität) ?

Oder was genau soll die machen ? Also, wozu brauchst du die ?

U© = U * e [hoch] (- (t / (R*C)))

U© = U * e ^ (-1 * (t / (R*C)))

generell so, wüde ich sagen, falls C keine float ist. Aber vielleicht gibst du noch ein paar Infos zu den Variablen.

U© = U * e [hoch] (- (t / (R*C)))

#include <math.h>

double res;

double dummy= -1*t/r*c;

res=exp(dummy);

alles klar?

@Klotzkopp

Die Klammern um r*c sind schon wichtig

Yesss Sir!

Sorry

  • Autor

@maxim_42

Also bis #include <math.h> hab ich's noch kapiert ;)

Also es ist 'ne stinknormale physikalische Formel zum Entladen eines Kondensator's.....das muss ich irgendwie mit Hilfe einer Kurve grafisch darstellen

(also Benutzer gibt Werte für R,C,U ein,drückt Button "Kurve" und das Proggy zeichnet die dazugehörige Kurve)

Ich glaub ihr habt auch die eulersche Zahl (e) unterschlagen :)

  • Autor

Oki, danke erstma...werd es demnächst mal ausprobieren, wenn ich 'n bissl mehr Zeit hab.

Hab Übrigens dieAufzeichnungen gefunde mit den Kurven (die ich darstellen muss) und den Formeln.

Vielleicht könnt ich euch die mal schicken daamit die Sahe mal klarer wird was ich nun genau machen muss und ihr mit vielleicht noch Tipps geben könnt ?? :)

Grafische Darstellung falsches Forum, wo soll denn das sonst rein ?? :confused:

  • Autor

Oki, dann unterlass ich Fragen betreffs der grafischen Darstellung :)

Kann ich dir denn mal die Unterlagen mailen damit du bitte noch paar Tipps/Vorschläge geben könntest ??

  • Autor

Ich kapier's net, bekomm nur 'ne blöde rote senkrechte Linie :(

Code:

//---------------------------------------------------------------------------

#include <vcl.h>

#pragma hdrstop

#include "Unit1.h"

#include <math.h>

//---------------------------------------------------------------------------

#pragma package(smart_init)

#pragma resource "*.dfm"

TForm1 *Form1;

//---------------------------------------------------------------------------

__fastcall TForm1::TForm1(TComponent* Owner)

: TForm(Owner)

{

}

//---------------------------------------------------------------------------

void __fastcall TForm1::btnBeendenClick(TObject *Sender)

{

Close();

}

//---------------------------------------------------------------------------

void __fastcall TForm1::FormShow(TObject *Sender)

//zeichnet 'ne weisse Fläche

{

imgGrafik->Canvas->Rectangle(0, 0, imgGrafik->Width, imgGrafik->Height);

imgGrafik->Canvas->FloodFill(10, 10, clWhite, fsBorder);

}

//---------------------------------------------------------------------------

void __fastcall TForm1::btnBerechnenClick(TObject *Sender)

{

//soll später in einem Memo die Formel etc. ausgeben

double LadeU, Zeit, Kapazitaet, Widerstand;

LadeU = StrToFloat(edtLade->Text);

Zeit = StrToFloat(edtZeit->Text);

Kapazitaet = StrToFloat(edtKapa->Text);

Widerstand = StrToFloat(edtWider->Text);

memBerechnung->Clear();

memBerechnung->Lines->Add(" Formel blablabla ");

}

//---------------------------------------------------------------------------

void __fastcall TForm1::btnGrafikClick(TObject *Sender)

{

//weisse Fläche wieder

imgGrafik->Canvas->Rectangle(0, 0, imgGrafik->Width, imgGrafik->Height);

imgGrafik->Canvas->FloodFill(10, 10, clWhite, fsBorder);

int xPos, yPos, Skala, xAbstand, yAbstand, Ergebnis, i;

float xWert;

xAbstand = 20;

yAbstand = 30;

Skala = 100;

//"einstellen des Stiftes"

imgGrafik->Canvas->Pen->Color = clRed;

imgGrafik->Canvas->MoveTo(xAbstand, imgGrafik->Height - yAbstand);

xWert = 0.1;

//Rechnung

while(xWert<2.1)

{

xPos = xWert * Skala;

Ergebnis = LadeU * exp(( -(Zeit / (Widerstand * Kapazitaet)))) * Skala;

for(i=1; i<5; i++)

{

yPos = Ergebnis * i;

}

//zeichnen der Kurve

imgGrafik->Canvas->LineTo(xAbstand + xPos, imgGrafik->Height - yAbstand - yPos);

xWert +=0.1;

}

}

//---------------------------------------------------------------------------

Erkennt einer den Grund ?? :confused:

Original geschrieben von toppy

Ergebnis = LadeU * exp(( -(Zeit / (Widerstand * Kapazitaet)))) * Skala;

Die Zeit sollte sich schon ändern, nimm doch statt dessen mal xWert.

for(i=1; i<5; i++)

{

yPos = Ergebnis * i;

}

Das macht keinen Sinn, ist das gleiche wie:

yPos = Ergebnis * 5;

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.