Hi,
I would like to plot the total_cases against days_tracked based on the country that is inputted by the user. The plotting of data is dependent on which country is inputted by the user, however if I for example put Australia as an input it does not plot.
I'm not sure if I have formatted the strcmpi properly as this might be where the problem is. I can't attached the excel file as it exceeds 5MB even as a zip file.
Thanks
covid_data = readtable('owid-covid-data.xlsx');%Extracting columns from excel
Total_cases = covid_data{:,6};Days_tracked = covid_data{:,5};Total_deaths = covid_data{:,9};New_cases = covid_data{:,7};New_deaths = covid_data{:,10};Location = covid_data{:,3};user_input= input('Please input a valid country','s'); all_countries = covid_data;if strcmpi(user_input,Location) plot(Days_Tracked,Total_cases)else fprintf('error')end
Best Answer