Réponse apportée
How can I creat condition?
d=1; if and(d>0, d<2) F=2*d; elseif and(d>2, d<3) F=5*d; end You can also use "if d>0 && d<2" instead. Type "help relop"...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Set the initial conditions for an Integrator through a .m scribt?
The command in the script looks like this: set_param('MyBlockPath','InitialCondition','1.1');

environ 6 ans il y a | 0

Réponse apportée
in Simulink, add line from line_node to block with command?
If you know that the connection can be started from block B3, then you can get the line handles of B3, then get the line handle ...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
Hyperlink in Excel cell to open Simulink model?
In Excel, you can "Insert Link", "Existing file or web page", navigate to find the .slx or .mdl model file. When you click it, i...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
How to programatically make workspace variable name same as the .mat file name loaded into Matlab?
It is possible but may not need to. Using the following approach can enable you always use Var.(MyVar) to refer your variable. O...

environ 6 ans il y a | 1

Réponse apportée
How can I generate a pulse with variable frequency?
In this model, the number of pulses and the frequency of the pulse are coupled. The simulation step, the sample time of the coun...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
How to generate the HDL Code from the Simulink Model?
Link to the HDL Coder toolbox and required other toolbox. https://www.mathworks.com/support/requirements/hdl-coder.html

environ 6 ans il y a | 0

Réponse apportée
How can I generate a number of pulses?
Use a "Counter Limited" block. Set the limit to be a large number and sample time to be 1. Compare (<=) it to a Constant block (...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Does Mathworks have support for software certification?
Mathworks.com, Products, IEC Certification Kit

environ 6 ans il y a | 0

Réponse apportée
How to select port in Multi Switch ?
Double click the multi-port switch block, click Help. Read the document and understand it. Go through the examples.

environ 6 ans il y a | 1

Réponse apportée
Matlab code for generating rectangle shapes
axis([0 10 0 10]) rectangle('Position',[1 2 5 6]) rectangle

environ 6 ans il y a | 0

| A accepté

Réponse apportée
how do I know which tool box is required for each function?
MATLAB is the base product. You can go to the Mathworks website, Products for more info. Or click Support, Documentation. If yo...

environ 6 ans il y a | 0

Réponse apportée
What is a convenient way to do Simulink model review ?
I would suggest the "Simulink Check" toolbox or Model Advisor in general.

environ 6 ans il y a | 0

Réponse apportée
Errors while running adaptive cruise control model from website
It requires the MPC toolbox. Do you have it? run ver mpc license inuse

environ 6 ans il y a | 0

| A accepté

Réponse apportée
How to refresh System Target File (.tlc) SelectCallback?
Reloading the model should should make it effective From the document rtwgensettings.SelectCallback: This structure field spec...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
How to reverse x-axis in a stacked plot.
This is interesting. I wonder if this meets your need. %% x=1:4; y=rand(size(x)); plot(y,x); xlabel('y'); ylabel('x'); ...

environ 6 ans il y a | 0

Réponse apportée
problem with sum in function
You are right. All you need to do is "function [s] = so(A)" to pass in the value of A.

environ 6 ans il y a | 0

Réponse apportée
How to access a Database from Simulink?
You can always use the "MATLAB Function" block. Keep in mind that it is executed at every simulation step.

environ 6 ans il y a | 0

Réponse apportée
How to count the 1X1 cells in a cell array?
a=cellfun(@numel,Out) sum(a==1)

environ 6 ans il y a | 1

| A accepté

Réponse apportée
Undefined Function or Variable 'FunctionNameHere'
It sounds like a license issue. You can find it out by running license() with various argument license('inuse') license('test'...

environ 6 ans il y a | 1

Réponse apportée
How to wrap the y-label in scope of matlab when it is exceeding the available space
ylabel(['first',newline,'second'])

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Simulink add a line between ports programatically
A line has a source port and a destination port. At the source port, the port can have multiple lines. But at the destination po...

environ 6 ans il y a | 0

Réponse apportée
Undefined function or variable 't'.
What is your "x"? Is it logged through "Data Import/Export"? Press Ctrl+E to open the configuration parameter, click "Data Impor...

environ 6 ans il y a | 0

Réponse apportée
How to remove Double datatype from stateflow.
No double data types in the chart. If Model Advisor tells you something, it is one of the configuration parameters. Press Ctrl+E...

environ 6 ans il y a | 0

Réponse apportée
Can I reference a library subsystem inside the library itself?
Yes. In the same library file, create A first, then drag and drop A to create B. Save file. Next, modify A, save file. See the A...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
How to vary offset during simulation
So you need to generate V*sin(2*pi*f*t). There is a block for sin(). Use "Repeating Sequence" or "Repeating Sequence Interpolat...

environ 6 ans il y a | 0

Réponse apportée
Opening scripts opens a new instance of Matlab
Why is a new instance of MATLAB opened when I double-click on a MATLAB file in Windows Explorer even if I have one instance of M...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
When is the 'ModelReferenceVersionMismatchMessage' Simulink model parameter editable?
Try this model='sldemo_mdlref_basic'; open_system(model); get_param(model,'ModelReferenceVersionMismatchMessage') set_param(...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
why setdiff function ignores to delete the element in the first column of an array
You've show its value is 1.5707963267948966192313216916398. It is the floating point data precision issue.

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Finding identical rows in 2 tables
look for doc in "doc ismember". There is an example for table rows found in another table.

plus de 6 ans il y a | 1

| A accepté

Charger plus