Hello, can someone please help me understand this error?
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Danikha Shyken
il 25 Set 2023
Commentato: Danikha Shyken
il 27 Set 2023
I'm particularly confused about the part which says '... and the phase delay parameters of this block need to be integer multiples of the fixed step size.
Risposta accettata
Fangjun Jiang
il 25 Set 2023
Modificato: Fangjun Jiang
il 25 Set 2023
If the pulse width is 87.85%, then the gap of the pulses will be 12.15%. Then you have to be able to distinguish at least 0.05% of the period to be able to make the 87.85% pulse and the 12.15% gap.
0.05% of the period (5e-7) is 2.5e-10, the number in the error message.
In other words, the simulation program has to be able to increase the simulation time every 2.5e-10 to be able to make the pulse. Your simulation step size (0.2) is way more bigger than that. Changing the simulation step size to be 2.5e-10 will fix the problem.
Feeding the Pulse Generator to the control port of the Multiport Switch block doesn't make sense. The value of the control port should be 1, or 2, or 3, to pass the 1st, or the 2nd, or the 3rd input, just like the icon of the block indicates.
Constant value [0.3:0.4] or [0.4:1.2] or [1.2:2] don't make sense either.
[0.3:0.4]
[0.4:1.2]
[1.2:2]
10 Commenti
Fangjun Jiang
il 27 Set 2023
Your logic is all mixed up. This is my final comment on this topic.
- Use a MATLAB Function block with "if-elseif" statement to process 4 manual switch inputs to create an interim output. The value of the interim output could be 1, 2, 3 or 4.
- Use this interim output to control that Multi-port Switch to pass through 4 possible voltage source. You got a single voltage output signal. The range of this signal is from 0.3 to 2.
- Use another MATLAB Function block to read the value of this single voltage signal to generate the output signal "mode". You seem to have this function already.
- There is other simpler way to do this. But at least, this approach should be able to generate the desirable output signal "mode".
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!