Previous Topic

Next Topic

...Generate Matlab Commands

Matlab is a common tool for post-processing. Matlab command files can be generated using the Tcl scripting language. Using this technique ensures that the same analysis parameters are used.

Here is an example.

# -------------MatlabOutput.tcl-------------------------------------------------------------------

set Xframe 1; # this parameter would be passed in

set fDir "Data/";

file mkdir $fDir; # create directory

set outFileID [open $fDir/DataFrame$Xframe.m w]; # Open output file for writing

puts $outFileID "Xframe($Xframe) = $Xframe;"; # frame ID

puts $outFileID "Hcol($Xframe) = $Hcol;"; # column diameter

puts $outFileID "Lcol($Xframe) = $Lcol;"; # column length

puts $outFileID "Lbeam($Xframe) = $Lbeam;"; # beam length

puts $outFileID "Hbeam($Xframe) = $Hbeam;"; # beam depth

puts $outFileID "Bbeam($Xframe) = $Bbeam;"; # beam width

puts $outFileID "Weight($Xframe) = $Weight;" ; # superstructure weight

close $outFileID