[kepler-users] Matlab expression actor

Michael Hernandez mherna48 at uiuc.edu
Fri Mar 6 08:09:37 PST 2009


Hi Dan,

You were right on the money. That little syntax error has been a pain for
some time now. Thanks for the help. One last question I have is what type of
class would I need to use for the output port to display a plot that was
made in matlab?

Thanks for all the help,
Mike

On Wed, Mar 4, 2009 at 5:18 PM, Daniel Crawl <crawl at sdsc.edu> wrote:

>
> Hi Michael,
>
> The parameter name that specifies locations of matlab scripts
> should be "packageDirectories". (The workflow you sent me
> earlier [matlab_v4.xml], was using "Package Directories").
>
>  --dan
>
>
> Michael Hernandez wrote:
>
>> Hi All,
>>
>> 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:
>>
>>
>> ---------------------------------------------------------------------------------------------------------
>> clear all;
>> warning off;
>> global count ;
>>
>> X_ALL(1:14) = 5 ;
>> X_SUB1(1:5) = 5 ;
>> X_SUB2(1:5) = 5 ;
>> X_OLD = X_ALL + 1 ;
>>
>> save X_SUB1.mat X_SUB1 ;
>> save X_SUB2.mat X_SUB2 ;
>> count=1;
>>
>> while ( (norm(X_OLD - X_ALL) > 0.001) )
>>      X_OLD = X_ALL ;
>>
>>    for i = 1:3
>>        switch i
>>          case 1
>>             [result X_ALL] = sys_s(X_ALL);
>>          case 2
>>             [result X_ALL] = subsys1_s(X_ALL);
>>          case 3
>>             [result X_ALL] = subsys2_s(X_ALL);
>>          otherwise
>>             result = 0;
>>             X_ALL = X_ALL;
>>        end
>>    end
>>    count = count + 1 ;
>> end
>>
>> X_SUB1 = [ X_ALL(3) X_ALL(8)   X_ALL(9)   X_ALL(10)  X_ALL(11) ]
>> X_SUB2 = [ X_ALL(6) X_ALL(11) X_ALL(12)  X_ALL(13) X_ALL(14) ]
>>
>> save X_SUB1.mat X_SUB1 ;
>> save X_SUB2.mat X_SUB2 ;
>>
>>
>> ------------------------------------------------------------------------------------------------------------------------
>>
>> 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.
>>
>> Another question I have is: Is there a newer version of Kepler, or is the
>> nightly build just the newer version??
>>
>> Thanks for the help,
>>
>> --
>> Michael Hernandez
>> University of Illinois - Electrical Engineering
>> SHPE | UIUC Alumni Relations Chair
>> Cell#: 847-736-3889
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Kepler-users mailing list
>> Kepler-users at kepler-project.org
>> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users
>>
>>
>
>


-- 
Michael Hernandez
University of Illinois - Electrical Engineering
SHPE | UIUC Alumni Relations Chair
Cell#: 847-736-3889
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20090306/ab46163d/attachment.html>


More information about the Kepler-users mailing list