Array indices must be positive integers or logical values. Error in Untitled2 (line 11) '_', Station_ids (i),...

1 view (last 30 days)
Fathinat Aboaba
Fathinat Aboaba on 25 Oct 2021
Commented: Walter Roberson on 25 Oct 2021
it keeps saying Unrecognized function or variable 'my_url'.
Error in LabFEECS (line 10)
gauge_data = webread(my_url);
and
Array indices must be positive integers or logical values.
Error in Untitled2 (line 11)
'_', Station_ids (i),...
and this is my code
my_url = strcat('https://', base_url, province, '/', frequency, '/', ...
province, '_', Station_ids (i), ...
'_', frequency, '_hydrometric.', file_type);
  1 Comment
Walter Roberson
Walter Roberson on 25 Oct 2021
For the first part, we would need to see more of the code -- and we would also need to know how you are invoking the file.
For the second part: the code has not assigned a value to the variable i at that point, so as far as the code knows, i is still the function that returns sqrt(-1)

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!