How to acces a simscape.logging.Node
이전 댓글 표시
I have a simulink/Simscape model, the results are logged in a variable called 'simlog'. I am struggeling to get the rotational speed from the Motor to plot it in a matlab skript.
I started to extract the informationm to a separate varibale called temp:
>> temp=(simlog.Motor_And_Load.PMSM.Permanent_Magnet_Synchronous_Motor.angular_velocity);
>> whos temp
Name Size Bytes Class Attributes
temp 1x1 8 simscape.logging.Node
>> temp
temp =
Node with properties:
id: 'angular_velocity'
savable: 1
exportable: 0
series: [1×1 simscape.logging.Series]
With plot(temp) a new figure opens every time. My goal is to have an array with time and velocity values that I can use in subplots and for further calculations. I tried it with a get but that doesn't work. Can someone please help?
>> test = get(temp, 'angular_velocity');
Path 'angular_velocity' is not a valid path for this node.
댓글 수: 3
madhan ravi
2023년 12월 2일
이동: madhan ravi
2023년 12월 2일
I don"t have the toolbox but this should work.
plot(simlog.Motor_And_Load.PMSM.Permanent_Magnet_Synchronous_Motor.angular_velocity.series) % first column is the time and second is the angular velocity
Kai
2023년 12월 2일
이동: madhan ravi
2023년 12월 2일
madhan ravi
2023년 12월 2일
이동: madhan ravi
2023년 12월 2일
Unfortunately I can’t test MAT file either since I don’t have access to computer. But you are right it’s already a figure.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Electrical Sensors에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!