Jump to content


  • Content Count

  • Joined

  • Last visited

About NilsWaap

  • Rank

Contact Methods

  • Skype

Profile Information

  • Gender
  • Are you University user?

Recent Profile Visitors

430 profile views
  1. Hello community, I want to share some code that will help you to use a gamepad/joystick in compose. I created an OML-class that represents the controller. I will provide you with more informations, documents and updates soon. To make the code work, you need to install the XInput-Python interface: https://pypi.org/project/XInput-Python/ In the topic below, there are instructions how to install python modules in compose: regards Nils vrjoystick.zip
  2. Hello community, for a project I needed a function that creates a sphere. Since there is no such function in the library I just want to share my function with you. best regards Nils sphere.7z
  3. Hello community, if you like to instantiate a certain number of a model/class/component and connect the ports with a for-loop you can do it like in the picture below: In this example a specified number of the "HeatedPipe" component is created. One for-loop is connecting the flow ports and the other one is connecting the heat ports. regards Nils RadiatorSimple.zip
  4. Hey commuinty last night I got the idea of creating a guitar tuner using activate Now I am curious if there is a way to get microphone access using the OML language. If not, i am sure there is a way by using Python language. Basically I just need to record an audio sequence and process it with my future activate model. Is there a way to interrupt the the process for recording? I will put that question in a new topic best regards Nils
  5. Thank you Fady, basically your solution is working. It worked several times... But after some time without any changes in the model this Error occoured: I had the same error with a "toMat-file" Block and 'solved' the issue by deleting the block. @RoKet The Simulations run one after the other. Regards, Nils
  6. Hello Community, is it possible to run a simulation by a command? I would like to run two simulations of two different models. The results of the first simulation are input values for the second. Regards, Nils
  7. Hello, I would like to draw a polyline into a figure. I tried to use the function "polyline" but unfortunately there is no help availabe to this function. I tried this: polyline('position',[5 5;4 6;4 7;5 8;6 8;7 7; 7 6]); But its not working. A figure is created without axes and polyline. No error messages occours. Regards Nils
  8. Solution: Up to now the Look-Up-Tables don't support to do a sweep by running a single simulation. Instead of doing a single simulation with a parameter vector, we have to do multiple simulations. By using the code below we can change the KR value with the use of the __counter__ variable. (Counts number of simulations performed) if __counter__<=length(KR_test) KR = KR_test(__counter__) else return end If you want to use signal out for different signals, you must name the variables differently, for example: ['simout_fahrer',num2str(__counter__)] And a end-block is needed that restarts the simulation at the event. Regards Nils M_Motor_LookUp.mat fahrer2.scm
  9. Thanks Roberta, the watertank example works fine A parameter sweep still does not work in my "controller-vehicle"-model. Are there any other parameters I need to change for my model? I am also using "Signal Out"-blocks and "to mat"--blocks. Furthermore I use look-up-tables. Could any of these blocks be a problem for a parameter sweep? Regards Nils fahrer.scm M_Motor_LookUp.mat
  10. Thank you Roberta! I modified your "watert.scm" example as you showed me and it works fine! If I use the watertank model from the "turtorial_models" folder the modification does not work. I made sure that both models are exactly the same. But for some reason there is a problem with the dimensions. I exchanged the superblocks with the superblock from your model and then it worked fine! The same problem shows up for my controller model. best regards Nils
  11. Hello community, how can I do a parameter sweep in activate? I want to simulate a controller with different parameters for the gain. Afterwards I want to overlay the different system responses in a plot. I defined a vector with different values for the controller gain "KR" and use it in a "MatrixGain"-block. KR = [1 .1 .06 .01 .02]; I hoped that could work but it doesnt. Another approch could be to do it by doing multiple simulations with different parameters. best regards Nils
  12. Hello commnity, I would like to control the number of tics on my x- axis. I tried the command : set(gca,'XTick',0:t_sim) and I also tried it with different handles to the axes and to the plot. Best regards, Nils
  13. Hello community, I would like to create a subplot that spans multiple grid positions. I tried it as following but its only possible to hand over scalar values to the subplot function subplot(2,2,1) plot(x,y) subplot(2,2,2) plot(x,y) subplot(2,2,3:4) <----- thats the issue plot(x,y) Best regards, Nils
  • Create New...