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.
Impossible de terminer l’action en raison de modifications de la page. Rechargez la page pour voir sa mise à jour.
Translated by
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.