![]() " ) // We do not want any simulation, just analyze Diagram continueSimulation = %f endfunction //first batch simulation with the parameters embedded in the diagram xcos_simulate ( scs_m, 4 ) ![]() " ) disp ( " Found " + string ( other ) + " Other component. " ) disp ( " Found " + string ( links ) + " Links. disp ( " Diagram Analysis: " ) disp ( " Found " + string ( blocks ) + " Blocks. objs links = 0 blocks = 0 other = 0 // Count Links and Blocks for i = 1 : size ( objs ) currentType = typeof ( objs ( i ) ) select ( currentType ) case " Link " links = links + 1 case " Block " blocks = blocks + 1 else other = other + 1 end end // Diplay Diagram analysis. function continueSimulation = pre_xcos_simulate ( scs_m, needcompile ) // Retrieve all objects objs = scs_m. ImportXcosDiagram ( " SCI/modules/xcos/demos/batch_simulation.zcos " ) typeof ( scs_m ) //The diagram data structure // Declare pre_xcos_simulation to only analyze Diagram.
0 Comments
Leave a Reply. |