i have a problem with the first line of my code . I don't know what does it mean . "Error in obtain_cur​rent_week_​data_dt>ob​atin_curre​nt_week_ac​tual_load_​data (line 64) Current_we​ek_actual_​load_data(​1,1)=Curre​nt_time_ac​tual_load;​"

조회 수: 1 (최근 30일)
Current_week_actual_load_data(1,1)=Current_time_actual_load;
temp1=Week_end_timestamp(1:10);
temp2=Week_end_timestamp(12:13);
temp3=Week_end_timestamp(14:15);
temp4=Week_end_timestamp(16:17);
Formated_string=[temp1,' ',temp2,':',temp3,':',temp4];
  댓글 수: 4
Walter Roberson
Walter Roberson 2018년 2월 6일
Current_time_actual_load is not a Mathworks provided function; I cannot find any function with that name anywhere on the Internet. You will need to look through your available functions and variables to see if you made a typing mistake . Perhaps you need to write a function with that name yourself.
javad amoli
javad amoli 2018년 2월 6일
편집: Walter Roberson 2024년 4월 29일
@Walter Roberson here is the function . I have determined a value for it.
function [Current_week_actual_load_data]=obatin_current_week_actual_load_data(load_time_stamp,load_value,current_week_time_stamps) data_length=length(current_week_time_stamps);
Current_week_actual_load_data=zeros(data_length,2);
%%% this is the actual original load of the building; the first columns is without ess
%%% and the second column is the net load with ESS output
Week_start_date_time=current_week_time_stamps{1};
Week_end_timestamp=current_week_time_stamps{data_length};
temp1=Week_start_date_time(1:10);
temp2=Week_start_date_time(12:13);
temp3=Week_start_date_time(14:15);
temp4=Week_start_date_time(16:17);
Formated_string=[temp1,' ',temp2,':',temp3,':',temp4];
for i=1:length(load_time_stamp)
idx = strcmp([load_time_stamp{i}], Formated_string);
ck=5;
if isequal(idx,1),
Current_time_actual_load=load_value(i);
load_time_stamp(1:i)=[];
load_value(1:i)=[];
break
end
end
Current_week_actual_load_data(1,1)=Current_time_actual_load;
temp1=Week_end_timestamp(1:10);
temp2=Week_end_timestamp(12:13);
temp3=Week_end_timestamp(14:15);
temp4=Week_end_timestamp(16:17);
Formated_string=[temp1,' ',temp2,':',temp3,':',temp4];
for i=2:length(load_time_stamp)
idx = strcmp([load_time_stamp{i-1}], Formated_string);
Current_week_actual_load_data(i,1)=load_value(i-1);
ck=5;
if isequal(idx,1),
% Current_time_actual_load=load_value(i);
% load_time_stamp(1:i-1)=[];
% load_value(1:i-1)=[];
break
end
end
end

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by