Dear Reza: If the inputs from TRNSYS are independent of the outputs from MATLAB, one solution could be this one: Run the case in TRNSYS and export the results (e.g. T_ambient) to a xls file. Load the data with MATLAB and make the mathematical process. Write the results from Matlab in another xls file. If you need to postprocess these data in TRNSYS, you can read them from the xls file and run again the project. Sure there is a better way to do it, but this manner is quite simple and fast, and you do not need to change your case a lot. Best regards
De: Safizadeh Mohammadreza [mailto:m.safizadeh@nus.edu.sg] Dear all TRNSYS users and Happy Spring; If I use Matlab code alone, I can load my whole data e.g T_ambient (every second) as my input data (6000) using "Load" command; and since I use some partial difference equations, I interpolate these 6000 data base on very small time step (dt=0.01 second). Thereafter, Matlab processes these 600,000 data in “for loop” and produces the outputs at the end of “for loop”. My problems is that: If I link Matlab and TRNSYS together: base on my initial understanding from Trnsys’s example, Trnsys call Only “one data” in each time step and process that only input to produce only one output. I want Trnsys to call all my data (6000) (like load command in Matlab) and pass these 6000 data to Matlab, and get 6000 output data from Matlab after mathematical process. Exactly like the command "Load" in Matlab to call my all inputs. I am looking your favorable email very soon :) Sincerely Yours Reza Safi ; PhD Condidate :: NGS - NUS Graduate School for Integrative Sciences and Engineering :: National University of Singapore, m.safizadeh@nus.edu.sg (E) :: https://sites.google.com/site/safizadehedu/ (w) Important: This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately; you should not copy or use it for any purpose, nor disclose its contents to any other person. Thank you. P Let's Go Green... Please think before you print! |