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;​"

3 次查看(过去 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 中查找有关 Introduction to Installation and Licensing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by