回答済み
Can you help me fix a faulty self-resetting integrator?
Right now, the reset trig is "falling" edge. Pure negative value won't trig it. You could add a Comparison block to compare ...

27日 前 | 0

回答済み
Can someone tell me what is wrong with this?
The problem is, vector x is not defined. When you do x1=5, I think you meant x(1)=5. But even with that, when k=1, x(2) is not d...

27日 前 | 0

回答済み
function rand with variables
a=10;b=20;c=30; mat=[a,b,c]; index=randi([1 3],1,10); out=mat(index)

27日 前 | 0

回答済み
Find the coordinates of a point chosen on a plot
Use data cursor, set "SnapToDataVertex" to be "on" and then get the position. See example in doc datacursormode

28日 前 | 0

回答済み
What is u(1:1+int,1)?
Do the following line by line to unerstand it u=magic(6) int=4 1:1+int u(1:1+int,1)

28日 前 | 0

回答済み
Error when trying to enter in a simple matrix
most likely need to be written as (cos(psi))^2

約1ヶ月 前 | 0

回答済み
[Solved] question
You have a recursive function which makes it a little complicated. But this modification seems to work. %% out=hanoi(3, 1, 2, ...

約1ヶ月 前 | 1

回答済み
Run an external program using matlab
system('$RaD -variable example.txt')

約1ヶ月 前 | 0

回答済み
How to add a new field in astruct
setfield(test,'NewField',1)

約1ヶ月 前 | 0

| 採用済み

回答済み
Scope problem in Simulink Desktop Real-Time
Check if you have a "Marker". On the Scope, View, Style, make sure "Marker" is "none".

約1ヶ月 前 | 0

| 採用済み

回答済み
MATLAB syntax (parantheses without intermediate steps)
mean(mean(abs(rand(10)-eye(10))))

約1ヶ月 前 | 1

回答済み
audioFeatureExtractor function not found
This function is introduced in R2019b. https://www.mathworks.com/help/releases/R2019b/audio/ref/audiofeatureextractor.html

約1ヶ月 前 | 0

| 採用済み

回答済み
apply initial conditions to a subsystem
Use "Initialize Function" in library Simulink\User-Defined Functions.

約1ヶ月 前 | 0

回答済み
How to programmatically rename Stateflow states that are grouped?
To handle this, Box=c.find('Name', 'Heater'); Box.IsGrouped=false; states(1).Name='NewName'; To handle it more generically...

約1ヶ月 前 | 0

| 採用済み

回答済み
Integrate, Load and execute a dll in a Simulink Model
C caller block

約1ヶ月 前 | 0

回答済み
Extract Structure element dynamically
%% s.a=1:10; s.b=rand(1,10); EleNames=fieldnames(s); plot(s.(EleNames{1}),s.(EleNames{2}));

約1ヶ月 前 | 0

回答済み
How can I count how many numbers are different from '-1'?
start with B=A~=-1

約1ヶ月 前 | 0

回答済み
How can I get the full MATLAB Mapping Toolbox? Some functions appear to be missing.
geodensityplot() was introduced in R2018b. https://www.mathworks.com/help/releases/R2019b/matlab/ref/geodensityplot.html

約1ヶ月 前 | 1

| 採用済み

回答済み
Duplicate Each Element in a Matrix without using Repelem or Repmat
a=eye(2); k=3; d=blkdiag(ones(k,1),ones(k,1)); b=d*a*d' %%Or a more generic case a=[1 2 3;4 5 6]; k=3; [m,n]=size(a);...

約1ヶ月 前 | 2

| 採用済み

回答済み
Enclosing Multiple Subplots in a Box
In the figure window, click "Insert", "Rectangle". Or % Create figure figure1 = figure; % Create subplot subplot(4,4,1,'P...

約1ヶ月 前 | 0

回答済み
Interweave two arrays in a specific pattern
%% a=(1:32)'; b=(10:10:320)'; %% c=reshape([a,b],16,[]); d=c(:,[1:2:end,2:2:end]); e=d(:) %% better solution from Gui...

約1ヶ月 前 | 0

回答済み
How can I save a variable to external harddisk
save(FileName, Variables). Specify the full path of your file, e.g. 'd:\mydoc\file.mat'

約1ヶ月 前 | 0

| 採用済み

回答済み
anyone have a clue why roots([1,6,9]) outputs complex numbers?
a is correct. use real(a) to get what you want.

約1ヶ月 前 | 0

回答済み
Simulink.findBlocksOfType for Multiple Types
vdp; Option=Simulink.FindOptions('RegExp',true); Simulink.findBlocks('vdp', 'BlockType','Gain|Outport',Option)

約1ヶ月 前 | 0

| 採用済み

回答済み
Change value of Simulink parameter inside of test harness to test two different variant subsystems
Just change the value of EST_REF_VEL_RBT_MODE_CFG. When its value is 1, ERVRBTModeHandling is activated. When the value is not 1...

約2ヶ月 前 | 0

回答済み
Processing Big Data Files
Split the large file to smaller files and apply Tall Array

約2ヶ月 前 | 0

回答済み
obtain a matrix out of other matrix
transpose(reshape((1:104)',13,[]))

約2ヶ月 前 | 0

| 採用済み

回答済み
Where to manually store a path.m file?
When you start MATLAB, the Command window will show you the current folder (default: \document\MATLAB). That is the startup fold...

約2ヶ月 前 | 0

回答済み
Opening a Matlab GUI as a mask of a Simulink block
Block properties, Callbacks, OpenFcn, put in the function that call your GUI. You need to pass the result back to the block usin...

約2ヶ月 前 | 0

Load more