New answers tagged

2

There's a Matlab function block. Follow the example and your inputs and outputs will create source/sink connections on the Simulink block to wire in values. I would only put the controller in there, and don't use the clear all command - if it's not persistent then a variable inside a function ceases to exist between function calls. Every call to the function ...


0

Split the output of the regulator into to seperate signals. function [v_out, omega_out] = C_REG(q) ... v_out = v; omega_out = omega; You are probably compounding the signals in a different way then Simulink is trying to demux it. You can use a Mux block if you really want just one signal path. There is also a change that simply changing the last line to a ...


0

SimMechanics has two ways to drive a joint - by angle or by torque. You can give it a position or speed and SimMechanics will auto-calculate the torque required to achieve that setpoint, or you can provide the torque and SimMechanics will auto-calculate what the resulting position change will be. You can simulate the system first by passing in the joint ...


Top 50 recent answers are included