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

Matlab command

 

tito_math
Forum-Newbie

Forum-Newbie


Beiträge: 2
Anmeldedatum: 18.10.15
Wohnort: Germany
Version: ---
     Beitrag Verfasst am: 18.10.2015, 13:36     Titel: Matlab command
  Antworten mit Zitat      
I have 2 equations like (D=D_zero*exp(-Q/R*T) and x=sqrt(Dt)).
Here 4 more variables which are D_zero, Q, T(temperature) and t(time).
I have in tebuler format of all those 4 variables. I need final result of X. Can anybody help me how to write a program in matlab
to get simultaneous result.

Advance thanks.
_________________

Tito
Private Nachricht senden Benutzer-Profile anzeigen


Harald
Forum-Meister

Forum-Meister


Beiträge: 24.501
Anmeldedatum: 26.03.09
Wohnort: Nähe München
Version: ab 2017b
     Beitrag Verfasst am: 18.10.2015, 16:55     Titel:
  Antworten mit Zitat      
Hi,

so unknowns are D, R, and x? That would be a problem because there is a redudancy of D and R, i.e. infinitely many combinations that are as good as each other.

Best,
Harald
Private Nachricht senden Benutzer-Profile anzeigen
 
Kobalt-III

Gast


Beiträge: ---
Anmeldedatum: ---
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 18.10.2015, 22:01     Titel:
  Antworten mit Zitat      
R is not unknown, it is the gas constant (R=8,314 J/mol*K).

Assuming you have imported your 4 variables into your workspace:

Code:

for i=1 to length(D_zero) % or any other variable
  x(i)=sqrt(D_zero(i).*exp(-Q(i)./(R*T(i).)*t(i).)
end
 


I'm not sure about the right syntax with the dots (you need to do the operation element wise), but I think this can be a possible way to calculate the path of your particle.
 
tito_math
Themenstarter

Forum-Newbie

Forum-Newbie


Beiträge: 2
Anmeldedatum: 18.10.15
Wohnort: Germany
Version: ---
     Beitrag Verfasst am: 18.10.2015, 22:52     Titel:
  Antworten mit Zitat      
@Kobalt-III... That's exactly i'm looking for. Thank you very much for your help.
_________________

Tito
Private Nachricht senden Benutzer-Profile anzeigen
 
Harald
Forum-Meister

Forum-Meister


Beiträge: 24.501
Anmeldedatum: 26.03.09
Wohnort: Nähe München
Version: ab 2017b
     Beitrag Verfasst am: 18.10.2015, 22:58     Titel:
  Antworten mit Zitat      
Hi,

note that there is no need for the for-loop:
Code:
x=sqrt(D_zero.*exp(-Q./(R.*T).*t)


Best,
Harald
Private Nachricht senden Benutzer-Profile anzeigen
 
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 - 2025 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.