Respondida
How to create an impulse when the value of a signal changes?
"Detect Change" block Enabled or triggered subsystem block Pulse Generator block

más de 4 años hace | 1

| aceptada

Respondida
How can I check if a cell array contains multiple strings without loops ?
>> cell2mat(regexp(FileNames,'S0A|S0B|S0C')) ans = 13 13 13 13 13 13

más de 4 años hace | 0

Respondida
Finding the endpoint (tip) in a figure
It looks like the figure is created by using stem(). If you created the figure, won't you have the data for the "red dot" alread...

más de 4 años hace | 0

| aceptada

Respondida
How to create an output excel file after using uitgetfile to select multiple files?
You have the uiputfile() to create or select a new file, you just need to utilize it. Change the last line to xlswrite(fullfil...

más de 4 años hace | 0

Respondida
How I can convert from binary to character?
%% a=[0 0 0 1 0 0 1 0 1 0 1 0 0 1 1 0]; b=sprintf('%d',a) c=reshape(b,[],8) d=bin2dec(c) e=char(d)

más de 4 años hace | 0

Respondida
How to download a simulink model used in documentation?
There is a "copy command" link. Run that command in the Command Window to bring up the model.

más de 4 años hace | 0

| aceptada

Respondida
Select Random columns from a matrix as a signal in Simulink
The number of columns "u" comes from an input of the MATLAB Function block, so the data involved IS variable size. The MATLAB F...

más de 4 años hace | 0

Respondida
Data type mismatch error in Simulink
The easiest solution is to add a Data Type Conversion block. The proper solution is to set the proper data type at the relevant...

más de 4 años hace | 0

Respondida
Similar lines are much different in time for run due to MATLAB profiler.
It takes time to create "Comp" as a structure. Add the line below first and then profile again. Comp=struct;

más de 4 años hace | 0

Respondida
Is it possible to save the output of a command as a variable?
VarName='Test1'; assignin('base',VarName,table)

más de 4 años hace | 1

| aceptada

Respondida
Data type Double/Boolean error type Matlab/Simulink
Use "Data Type Conversion" block

más de 4 años hace | 0

Respondida
Use of Variables in Simulink Matlab Function
In MATLAB Function block Editor, click "Data", define "h" as a parameter.

más de 4 años hace | 1

Respondida
how to create cell array using matrix data?
I think you want to convert 4x5x3 matrix data into 4x5 cell, each cell is a 1x3 matrix data. There is a way to do it but I doubl...

más de 4 años hace | 1

Respondida
How can I make subscript in SIMULINK block name?
Block name is used to ID the block, so don't use special characters or formating. Use annotations. Double click on the canvas, ...

más de 4 años hace | 1

| aceptada

Respondida
put two matrices in one matrix, one will take the odd column and the other one take the even column.
C=reshape([A;B],size(A,1),[])

más de 4 años hace | 0

Respondida
Run a Simulink model, pause it, change some parameters and resume the simulation
For any of these properties, press Ctrl+E to open the Configuration Parameters dialog window, find the property, such as 'Save F...

más de 4 años hace | 0

| aceptada

Respondida
How can I demux a "From workspace" vector or array into individual constant blocks?
Don't use the "From Workspace" block. Just use the Constant block, specify the value as "a" and then Demux.

más de 4 años hace | 0

| aceptada

Respondida
How do I multiply the first 50 values of an array?
A=1:100; A(1:5)=A(1:5)*3

más de 4 años hace | 0

| aceptada

Respondida
How to extract a matrix from the indexing data
They can not be scaled to the same size as A. Maybe you are looking for the matrix "index" in the below example? see help of in...

más de 4 años hace | 0

Respondida
How to solve matrix raised to -1
A^(-1) inv(A)

casi 5 años hace | 0

| aceptada

Respondida
How do I get time in input?????
t=now

casi 5 años hace | 0

Respondida
Multiply matrix column by an equation
A=[1:3;10:10:30]' A(:,1)=log(A(:,1)+1)

casi 5 años hace | 0

| aceptada

Respondida
regexp function that checks if a specific letter is in the end of a cell (last character)
Don't even need regexp() metForm{i}(end)=='P'

casi 5 años hace | 0

| aceptada

Respondida
Two matrices (n x 1) & (m x 1) : How to get an output matrix of size (n x m) containing pairs
I would not think you need to create such a matrix. That matrix simply duplicates lots of data. The truly useful and unique data...

casi 5 años hace | 0

Respondida
try to have simulink's stop time as a block
Use a Clock block, which outputs the simulation time/clock. Compare the Clock with your Constant block. Connect the output to a ...

casi 5 años hace | 0

Respondida
How to call Stateflow charts in a sequence
Use a Function-Call Generator block and a Function-Call Split block to sheduel the calling sequence.

casi 5 años hace | 0

Respondida
Simulink: How do you send a function call to another model?
In this case, double click the "In1" Inport block inside the referenced model, check the "Output function call" option under the...

casi 5 años hace | 0

Respondida
How format external data for an inport with enum data type defined in data dictionary in Simulink?
double click the Inport block, select the "Signal Attributes" tab, in "Data type', pick "Enum: <class name>" and specify your cl...

casi 5 años hace | 0

Respondida
Compile Parametrized Simulink model name
In this case, you might have to use eval() MyCommand=[modelname,'([],[],[],''compile'')']; eval(MyCommand);

casi 5 años hace | 1

| aceptada

Respondida
how to set data store variable as block parameter variable?
Use a Math function block. y=sin(2*pi*Fr*t), specify Clock multiplied by Fr as input and perform sin() function on it.

casi 5 años hace | 0

Cargar más