Réponse apportée
Splitting Up Large Matrix into n rows x 2 columns
n=100; a=rand(100,4); x=a(:,1:2) y=a(:,3:4)

presque 6 ans il y a | 1

Réponse apportée
Is it possible to read from file in an enabled subsytem?
Rather than trying to figure this out, why don't you just read it from file, use the enable signal or trig signal to switch betw...

presque 6 ans il y a | 0

Réponse apportée
How to create a subsystem running at an integer number of sampling rate of its parent's subsystem, which is a function call triggered?
If the parent system is "triggered" at 10ms rate, the child system is never going to be able to run at 4s rate. Without special ...

presque 6 ans il y a | 0

Réponse apportée
Convert Vector into Scalar Simulink
Demux it you will get 1, 2 and 3, then 1*100+2*20+3=123

presque 6 ans il y a | 1

| A accepté

Réponse apportée
Index in position 2 exceeds array bounds (must not exceed 68160).
Here is a simple way to duplicate your error. Hope you will get it. When you have a matrix of say 2x3 elements, you can't access...

presque 6 ans il y a | 0

Réponse apportée
How to assign label from one cell array to data inside another cell array?
Don't be obsessed with cellfun(). A simple for-loop will do %% C = {ones(4,5), 2*ones(4,5), 3*ones(4,5); 4*ones(4,5), 5*ones(4...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
What is the code to call this function?
The function should be written like this and saved as tri_area.m function [area] = tri_area(b,h) area=1/2*(b)*(h); en...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Connecting a line from the first data point to the last data point
x=1:10; y=rand(size(x)); scatter(x,y); line(x([1 end]),y([1,end]))

presque 6 ans il y a | 0

| A accepté

Réponse apportée
simulink simulation data inspector : measurement of delta between data cursor
Right click, data cursors, turn on One and Two, you will see delta x

presque 6 ans il y a | 1

Réponse apportée
Simulink Input Array with Trigger
A simplified example. Make two inputs, one is 5 and one is 10. Inside, Compare output to the first input (5) , if less, pass 5, ...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Blocks are not shown on simulink page.
Drag and drop the block from library to the canvas of your Simulink model, then double click and set the parameters.

presque 6 ans il y a | 0

Réponse apportée
How to reduce the execution time for Input/Output ports in Simulink?
An atomic subsystem will have to update its Inport and Outport at every simulation step while virtual subsystems don't need to d...

presque 6 ans il y a | 0

Réponse apportée
Find reason for this warning msg: Variable 'hws' originally saved as a handle cannot be instantiated as an object and will be read in as a uint32.
My suspect is that there is a variable also called 'hws' in the .mat file. It was the handle of an object. For example, the hand...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
On MATLab app designer, how can i get an editfield text as a variable?
EditFieldText='x(1)^3 + x(2)^2'; F=str2func(['@(x)',EditFieldText]); Then pass the function handle F to another function and u...

presque 6 ans il y a | 1

Réponse apportée
Set signal line label visibility programatically
A signal line in a Simulink model, once it is named, it will always show. There is no property to hide or show it. Unless, in y...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
Can't append two large matrices due to limit in Matlab
Use Tall Arrays

presque 6 ans il y a | 1

Réponse apportée
Updating simulink block parameter as the simulation runs.
setting array value as [time1 value1;time2 value2; time3 value3....] works for signal, not for parameters. Use this approach ins...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Unexpected error when plotting a bar chart
because your data is 4x2, h is an 1x2 array so you can't use h.YLabel. Check the value of h You have to use h(1).YLabel but the...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Insert a function in Simulink
The Clock block gives you time t for simulation. The rest is to use multiplication, sum and Devide.

presque 6 ans il y a | 0

| A accepté

Réponse apportée
One variable, two 'To Workspace' blocks simulink
"Res" is the variable created in the based workspace after simulation is done to log your simulation data You can't have two "T...

environ 6 ans il y a | 0

Réponse apportée
Matlab to excel and back! Q about using ActiveX
See if you have this file in your MATLAB release edit ChangeRowHeightInRangeOfSpreadsheetCellsExample.m

environ 6 ans il y a | 0

Réponse apportée
Is there a function that will test if the input is char OR string OR cellstr?
You've made that function. If you look at the "See also" section of "help iscellstr", you don't see any other related functions....

environ 6 ans il y a | 0

Réponse apportée
obtain answer in brackets
mat2str(magic(3))

environ 6 ans il y a | 1

| A accepté

Réponse apportée
check referenced models do exist
You can do this. MdlRef=find_system(Model,'BlockType','ModelReference'); for k=1:length(MdlRef) SubModel=get_param(MdlRef{k},...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Accessing Simulink Model using M script
Something like this: Model='MyModel'; open_system(Model); Sys=find_system(Model,'BlockType','SubSystem'); for k=1:length(Sys...

environ 6 ans il y a | 0

Réponse apportée
how to add singal and its attributes( data type, min, max values to data dictionary programatically?
What you can do is to create the Simulink.Parameter as a temparary object and assign all its properties and then addEntry(). A ...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
all test harness signals are initialized to the wrong values (ZEROS)
Find the source of the signal in the model (the output of a Gain block or could be a root level Inport block, where the signal i...

environ 6 ans il y a | 0

Réponse apportée
Change Simulink.Parameter ExportedGlobal from inside Simulink model
The reason that the external code can modify that parameter is because You made it ExportedGlobal It is C code The C code bas...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Simulink: minimum values in vector segments
Use a MATLAB Function block and code similar like this: y=min(reshape(1:20,4,5)) work out the warnings and errors regarding var...

environ 6 ans il y a | 1

Réponse apportée
Observe the output in Matlab workspace
Assume "y" is "the output". Let's do it properly. In your Simulink model, double click the signal line out of the dy/dt Integrat...

environ 6 ans il y a | 0

Charger plus