[ADMB Users] "for" looping or "trans" (transpose) operation fails in REPORT_SECTION

James R. Bence bence at msu.edu
Mon May 30 05:58:21 PDT 2011


Saang-Yoon

I am not sure whether your code attempting to use looping and tran in 
report section failed or you are just wondering if it is possible.  There 
should be no problem doing this in the report section.  For example the 
following code added to report section of "catage.tpl" example distributed 
with admb works fine:

  report << "Transposed F table " << endl;
   report << trans(F)<<endl;
   int i,j;
   for (i=1;i<=nyrs;i++)
     for (j=1;j<=nages;j++)
     {
       {
       if (i==1 & j==1) report<<"Year "<< "Age " << " F   " <<  " N  "<<endl;
       report <<i <<"    "<<j<<"     "<<F(i,j)<<"   " << N(i,j)<<endl;

Jim

At 10:22 PM 5/28/2011, Saang-Yoon wrote:
>Hello.
>I wonder about whether REPORT_SECTION allows "for" looping or "trans"
>operation (i.e., transpose).  I would like to arrange outputs from
>REPORT_SECTION in a vertical or horizontal way.  Of course, I could
>arrange them  in the way of my preference before the section, and then
>put them in the section.  But I suspect that advanced ADMB users may
>be able to do so in REPORT_SECTION.   Thank you,
>Saang-Yoon
>_______________________________________________
>Users mailing list
>Users at admb-project.org
>http://lists.admb-project.org/mailman/listinfo/users

Jim Bence
Dept. of Fisheries and Wildlife
Michigan State University
http://www.msu.edu/user/bence/ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20110530/9b5c1127/attachment.html>


More information about the Users mailing list