Plot a VS graph from simulink scope to Matlab

52 vues (au cours des 30 derniers jours)
imran muhd
imran muhd le 20 Mar 2020
Réponse apportée : Jaimin le 13 Déc 2022
So, i build a dc motor. I want to plot a dc characteristic curve which are Torque Vs Speed, Torque Vs Armature Current and Speed Vs armatur current. How to plot this graph from simulink scope. I already connected to workspace but i stuck on how to proceed from matlab part. Its quite confusing.

Réponses (3)

Fangjun Jiang
Fangjun Jiang le 20 Mar 2020
Simulink Scope is always time based so the x-axis is always time. If you want Torque vs Speed, you need to use the "XY Graph" block. In MATLAB, you just run plot(Ws,T), assume the "Ws" and "T" saved in that "To Workspace" blcok are saved in array format and they have the same size.
  1 commentaire
imran muhd
imran muhd le 21 Mar 2020
thanks, this work jus fine

Connectez-vous pour commenter.


Sara Nadeau
Sara Nadeau le 20 Mar 2020
If you're working in R2019b or R2020a, you could use the XY visualization in the Simulation Data Inspector as well: Visualize Simulation Data on an XY Plot.

Jaimin
Jaimin le 13 Déc 2022
plot(ws,t)

Catégories

En savoir plus sur Simulink Functions dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by