回答済み
Execute subsystem in Simulink if condition is met for 5 seconds?
Do an equal comparison (==) between RC_flag and zero, generate this int_flag. Feed int_flag to an Integrator. If the output of t...

7年弱 前 | 0

| 採用済み

回答済み
How can I fix the error when I open the example 'ACCTestBenchExample'?
It is likely that the data has not been properly loaded. Run the following to bring up the Help page and click "Open Model" to s...

7年弱 前 | 0

回答済み
Indexing a Variable in an Input Prompt
prompt = sprintf('Player %i move x: ', Playerturn)

7年弱 前 | 0

回答済み
What is the correct syntax for save_system for SaveDirtyReferencedModels?
save_system('modelT','modelT','SaveDirtyReferencedModels',true), or replace true with 'on'

7年弱 前 | 1

回答済み
In Simulink, how do I combine 2 function calls into one to trigger a stateflow?
I would create two boolean signals based on those two methods. Then you can do AND or OR operation and then enable the Stateflow...

7年弱 前 | 0

回答済み
How to fit to view custom masked block permanently?
Select All, move all the blocks to the top-left cornor as close as possible.

7年弱 前 | 1

回答済み
how to save lists into mat-file while keeping their original name?
for k = 1:length(myFiles) baseFileName = myFiles(k).name; fullFileName = fullfile(myDir, baseFileName); I{k} = xl...

7年弱 前 | 0

回答済み
How to set slower time sample for a subsystem inside of another periodic atomic subsystem
Put the S-function inside a Triggered Subsystem, which is set to be triggered by Function Call. Use a Function Call Generator to...

7年弱 前 | 0

回答済み
branched signals to merge block
If a signal line goes to a Merge block, this signal line can't go anywhere else (branched). If you really need to use this signa...

7年弱 前 | 1

回答済み
How to generate a pwm signal with duty cycle 30%
Use a resetable integrator to generate a sawtooth wave, compare it with a constant value, you'll get a PWM wave. The value of th...

7年弱 前 | 0

| 採用済み

回答済み
Possible bug in visdiff - need confirmation and a workaround
I think it is a bug, or at least a defect. I've seen similar issues. Inserting an Inport block in the middle of a subsystem bloc...

7年弱 前 | 0

回答済み
errors after update to 2019
It is a function in the Optimization Toolbox. Do you still have this toolbox in new version of MATLAB?

7年弱 前 | 0

回答済み
'break' in 'while' loop
From help break In nested loops, break exits from the innermost loop only

7年弱 前 | 0

| 採用済み

回答済み
Combining a function and solver to create a M-function in Simulink
Simulink is the perfect tool to solve this problem (get y output based on input A and B). Why take the awkward long route? In fa...

7年弱 前 | 1

回答済み
How to find the variables of simulink non-active variants subsystem
from doc Simulink.findVars Simulink.findVars discovers variable usage in inactive subsystem variants only if you select Analyze...

7年弱 前 | 0

回答済み
at which piont i have the minimum value
[t,index]=max(z); value=i(index)

7年弱 前 | 0

回答済み
To Workspace Block - Output Array Size Problem
A Simulink simulation runs for a period of time. The output being 51x1 size array probably means the simulation ran for 50 steps...

7年弱 前 | 0

| 採用済み

回答済み
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 ...

7年弱 前 | 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...

7年弱 前 | 0

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

7年弱 前 | 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

7年弱 前 | 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)

7年弱 前 | 0

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

7年弱 前 | 0

回答済み
How can I make my output into a 2D char array instead of separate answers?
You have a recursive function which makes it a little complicated. But this modification seems to work. %% out=hanoi(3, 1, 2, ...

7年弱 前 | 1

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

7年弱 前 | 0

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

7年弱 前 | 0

| 採用済み

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

7年弱 前 | 0

| 採用済み

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

7年弱 前 | 1

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

7年弱 前 | 0

| 採用済み

さらに読み込む