Questions tagged [simulink]

Simulink® is an environment developed by The MathWorks for multidomain simulation and Model-Based Design for dynamic and embedded systems.

Simulink® is an environment developed by The MathWorks for multidomain simulation and Model-Based Design for dynamic and embedded systems. It provides an interactive graphical environment and a customizable set of block libraries that let you design, simulate, implement, and test a variety of time-varying systems, including communications, controls, signal processing, video processing, and image processing.

Some useful links:

2873 questions
0
votes
1 answer

Import workspace variables from excel/csv Matlab

I'm trying to load what equates to a configuration file of csv format into my matlab work space. I have numerous variables that are essentially hard coded. To help the end user I want to import these variables from an excel file so that should any…
Sam
  • 293
  • 3
  • 19
0
votes
1 answer

Displaying Data as a String in Simulink RT Display Port

My issue involves using the RS-232 Simulink RT blocks. A model is uploaded to the target PC (xPC) and it transmits and receives data from a variable frequency drive (VFD) that controls a motor. The issue arises on the receiving end when I take data…
0
votes
1 answer

Find a last index of certain value

I have this array x=[0,1,3,5,6,6,6,7,8,9] I know that I have 3 values of (6) how can I get the index of the last value of (6) I'm expecting an output ans= 7 I'm trying to use the find command but it gives me the first occurrence of the value Any…
user14405599
0
votes
0 answers

Find and replace in Simulink

I have a large simulink model, where I have to change a variable (say from 'x' to 'y') at 500 places. How to do it ? I cannot find 'find & replace option in my simulink
parag
  • 25
  • 4
0
votes
1 answer

Simulink Design Verifier: Input argument #1 is an invalid cvdata object

I am trying to run a few tests on a very simple Simulink model on Matlab 2020a. I have obtained test results by using the Test Manager app, which allows me to set up a test case. The function I created is very simple, it just checks two boolean…
montan
  • 87
  • 9
0
votes
1 answer

Converting [Nx1] signal to N separate signals in Simulink

I am using the following UDP receiver block for the Parrot Mambo drone, Which outputs an [2x1] array of singles in my case. However, I would like to split the output into two separate signals. What block should I use for this?
Thomas Wagenaar
  • 6,489
  • 5
  • 30
  • 73
0
votes
1 answer

How to convert pu SI unit system in Matlab Simullink?

My simulink model Everything is displayed in pu system. I want them in SI units. How do I do it?
0
votes
3 answers

Integer to Binary Conversion in Simulink

This might look a repetition to my earlier question. But I think its not. I am looking for a technique to convert the signal in the Decimal format to binary format. I intend to use the Simulink blocks in the Xilinx Library to convert decimal to…
Kiran
  • 8,034
  • 36
  • 110
  • 176
0
votes
1 answer

Pause input into enabled subsystem when valid signal = 0 Simulink

My simplified Simulink model involves plotting a sine wave going through an enabled subsystem. The simulation time step is 1/(125e6) seconds and the subsystem is only enabled once every 1/(250e3) seconds using a pulse generator. When the subsystem…
0
votes
0 answers

Simulation of real world scenario on simulink/simscape

I'm planning on simulating a real world scenario in Matlab. I have an experimental setup inside a closed environment in which the humidity is controlled predominantly. I'm studying the effects of humidity on the machine and see if the output of the…
Vinayak
  • 11
  • 1
0
votes
1 answer

How do I unlock a Simulink library to make it editable?

Simple question - how do I unlock a Simulink (i.e. part of MATLAB) block library to edit it?
LightCC
  • 9,804
  • 5
  • 52
  • 92
0
votes
0 answers

Problem converting Matlab function to a Simulink function

I need to convert this function, which implements the gradient descent algorithm: function [xopt, fopt, niteration, gnorm, dx] = grad_descent2(varargin) if nargin == 0 x0 = [3 3]'; elseif nargin == 1 x0 = varargin{1}; end tolerance =…
0
votes
1 answer

Accessing parsim data in Matlab

Good evening, May I please get advice with the following Matlab code? Here it is: %% CLEAR ALL close all clear all clc %% LOAD MODEL AND LHC FILE tic %start the clock idx=1; model = 'PG_PN_basic_rev1'; %This is the simulink file you wish to…
gman2020
  • 39
  • 5
0
votes
1 answer

How to return numpy.array using python in simulink

I built a neural network controller in python, and want to control a simulink model using the python function. The input and output of my python function are 'numpy.array'. The output shape is [4, 1]. I used a 'matlab function' to call the python…
haowu
  • 1
  • 1
0
votes
1 answer

Matlab, Running Simulation with Incrementally Increasing Input

I have a simple transfer function model with with a single variable input (Gain, referred to as 'k'). I am trying to run 10 simulations with the value of 'k' starting at 1 and increasing by a value of 1 with each iteration. The first way I tried to…
FuzMunkey
  • 17
  • 4