I have a very simple circuit in matlab.
There is a voltage source of 100 V peak. Both resistance if of 100 ohm.
If I see the voltage in display
box, it shows 36.476 V
But in the TESTV
matrix it shows 25.1761
V
Why is it different?
This is the dialog properties of TESTV
Take the decimation as 1
See this link Matlab help link
For example, suppose you have a simulation where the start time is 0, the Limit data points to last is 100, the Decimation is 1, and the Sample time is 0.5. The To Workspace block collects a maximum of 100 points, at time values of 0, 0.5, 1.0, 1.5, ..., seconds. Specifying a Decimation value of 1 directs the block to write data at each step.
I took the decimation as 1 and I got same values in workspace and in matrix
The Display box
probably show the value from a different time step. I would try changing the configuration parameters
and the step time values and the simulation time
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With