Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
I want to run it for 5 times for different 'Current' so I manually change the value. So now I want to make it automatic
조회 수: 1 (최근 30일)
이전 댓글 표시
Amp=1;
while(exit)
i=i+1;
tic
%reference = S(i);
%
fprintf(eLOAD_instr, 'curr %2f',Amp) % Setpoint to eLOAD
pause(0.1)
%
%%Get Data from ELR9000
% Setpoint, Current, Voltage, Power
Data_eLOAD_string = query(eLOAD_instr, 'curr?; measure:current?; measure:voltage?; measure:power?');
% Write Data_string in vector of type struct
Data_eLOAD_string_vec{i} = Data_eLOAD_string;
toc
%
while(toc < T_smpl) % define Sampling time (0.1s)
;
end
end
Set_pointStr = int2str(Amp)
save ( ['Test_',Set_pointStr,'_Amp' '.mat'], 'U_eLOAD','I_eLOAD')
in this code now I want to run it for 5 times for different 'Current' so I manually change the value. So now I want to make it automatic
댓글 수: 1
Sonam Gupta
2017년 12월 7일
Where are you setting the different current value? If it is Amp, You can define the values in array and then use a for loop iterating over the elements of the array.
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!