<div class="gmail_quote">Hi All,<br><br>I'm still having trouble with the matlab expression actor. I wrote a code in Matlab, that I'd like to run in Kepler, that calls on other files within the Current Directory. I'd like to get two outputs from my code, so I configured two output ports from the Matlab actor of type double. The output it gives me is the same as the initialized variables I set in the code. The conclusion I came up with is either a) the Current Directory is not set correctly in Kepler, b) it's not running through the While loop I have in my code, or c) the matlab actor in Kepler can't pass variables correctly between functions. Here is the code that I put into the matlab expression actor in Kepler:<br>
<br>---------------------------------------------------------------------------------------------------------<br>clear all;<br>warning off;<br>global count ;<br><br>X_ALL(1:14) = 5 ;<br>X_SUB1(1:5) = 5 ;<br>X_SUB2(1:5) = 5 ;<br>
X_OLD = X_ALL + 1 ;<br><br>save X_SUB1.mat X_SUB1 ;<br>save X_SUB2.mat X_SUB2 ;<br>count=1;<br><br>while ( (norm(X_OLD - X_ALL) > 0.001) )<br> <br> X_OLD = X_ALL ;<br><br> for i = 1:3<br> switch i<br> case 1<br>
[result X_ALL] = sys_s(X_ALL);<br> case 2<br> [result X_ALL] = subsys1_s(X_ALL);<br> case 3<br> [result X_ALL] = subsys2_s(X_ALL);<br> otherwise<br> result = 0;<br>
X_ALL = X_ALL; <br> end<br> end<br> count = count + 1 ;<br>end<br><br>X_SUB1 = [ X_ALL(3) X_ALL(8) X_ALL(9) X_ALL(10) X_ALL(11) ] <br>X_SUB2 = [ X_ALL(6) X_ALL(11) X_ALL(12) X_ALL(13) X_ALL(14) ] <br>
<br>save X_SUB1.mat X_SUB1 ;<br>save X_SUB2.mat X_SUB2 ;<br><br>------------------------------------------------------------------------------------------------------------------------<br><br>And what I'd like to output from the code is the modified X_SUB1 & X_SUB2 at the end. But in Kepler, the display shows X_SUB1(1:5) = 5 & X_SUB2(1:5) = 5 ; which is what was initialized at the top.<br>
<br>Another question I have is: Is there a newer version of Kepler, or is the nightly build just the newer version??<br>
<br>Thanks for the help,<br><font color="#888888"><br>-- <br>Michael Hernandez<br>University of Illinois - Electrical Engineering<br>SHPE | UIUC Alumni Relations Chair<br>Cell#: 847-736-3889<br>
</font></div>