필터 지우기
필터 지우기

How to generate COMTRADE file from simulink simulations?

조회 수: 24 (최근 30일)
Tejas Rivonkar
Tejas Rivonkar 2020년 1월 23일
댓글: Tejas Rivonkar 2020년 7월 1일
% Create the .dat file
clc
format short
NS1 = size(tout); % to find the number of samples
NS2 = NS1(1,1);
FileName = input('Please enter a file name:', 's');
FN_cfg = [FileName,'.cfg'];
FN_dat = [FileName,'.dat'];
Data =[transpose((1:1:NS2)) tout M];
csvwrite(FN_dat,Data)
unique(tout, 'rows', 'stable');
I am using the above code to generate COMTRADE files for different scenarios in the simulink.
but whenever I add a display into the simulation model i get an error saying the following
Caused by:
Dimensions of arrays being concatenated are not consistent.
How to resolve the issue so that i can use the display but at the same time, i want to create the COMTRADE file?
  댓글 수: 2
Abdallah
Abdallah 2020년 6월 29일
Hi Tejas,
Did you solve your problem, I am interesting in converting a figure from MATLAB to comtrade file.
Please if you could help with that.
Thanks
Tejas Rivonkar
Tejas Rivonkar 2020년 7월 1일
Yes. The problem was due to the extra values that were being generated.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by