I have two signals and they are displayed in different styles in the data inspector. I turned on markers with the command line to better display the problem. The top graph displays the value of the last marker until the new marker. The bottom graph shows a straight line between the two markers. Can i change this?
This appears to be because the signal ‘Warmtetransport door thermische schil” has been set with the interpolation property “zoh”, which is zero-order hold. In this case, the Data Inspector will use the same data sample as the previous sample for the interpolated time samples. Whereas in linear interpolation, the Data Inspector will approximate the interpolated value. The below code changes the required property in a ramp signal in Simulink.
ramp = out.logsout.get(1);
ramp.Values.DataInfo.Interpolation = 'zoh'; % To set the signal with zoh interpolation
ramp.Values.DataInfo.Interpolation = 'linear'; % To set the signal with linear interpolation
This is the case when setting the interpolation to zero order hold.
This is the case when setting the interpolation to linear.
Impossibile completare l'azione a causa delle modifiche apportate alla pagina. Ricarica la pagina per vedere lo stato aggiornato.
Translated by
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.