MATLAB FUNDAMENTALS 11.4 Issue with y-data in MATLAB plot not being correct
I am encountering an issue with the y-data in a MATLAB plot not being correct. Here are the steps to reproduce the issue:
Load the data from movies.txt and releaseDates.txt using readtable.
Modify the variable names in the release table.
Ensure the Title variable in the release table matches the Title variable in the movies table.
Join the two tables using the Title variable as the key.
Convert the ReleaseDate to datetime format.
Sort the movies table by ReleaseDate in ascending order.
Plot AdjustedGross against ReleaseDate.I have confirmed there are no missing values in the AdjustedGross column and that the data types for ReleaseDate and AdjustedGross are correct. The plot is still not displaying the y-data as expected.
here is the code
This code sets up the activity.
movies = readtable("movies.txt","TextType","string");
release = readtable("releaseDates.txt","TextType","string");
movies
release.Properties.VariableNames(1) = "Title"
release.Properties.VariableNames(2) = "ReleaseDate"
release.Title = movies.Title
movies = join(movies, release, ‘Keys’, ‘Title’);
Task 1
movies = sortrows(movies,"ReleaseDate","ascend")
disp(movies.AdjustedGross)
plot(movies.ReleaseDate, movies.AdjustedGross,"-");
xlabel(‘Release Date’);
ylabel(‘Adjusted Gross Revenue’);
title(‘Adjusted Gross Revenue vs. Release Date’);I am encountering an issue with the y-data in a MATLAB plot not being correct. Here are the steps to reproduce the issue:
Load the data from movies.txt and releaseDates.txt using readtable.
Modify the variable names in the release table.
Ensure the Title variable in the release table matches the Title variable in the movies table.
Join the two tables using the Title variable as the key.
Convert the ReleaseDate to datetime format.
Sort the movies table by ReleaseDate in ascending order.
Plot AdjustedGross against ReleaseDate.I have confirmed there are no missing values in the AdjustedGross column and that the data types for ReleaseDate and AdjustedGross are correct. The plot is still not displaying the y-data as expected.
here is the code
This code sets up the activity.
movies = readtable("movies.txt","TextType","string");
release = readtable("releaseDates.txt","TextType","string");
movies
release.Properties.VariableNames(1) = "Title"
release.Properties.VariableNames(2) = "ReleaseDate"
release.Title = movies.Title
movies = join(movies, release, ‘Keys’, ‘Title’);
Task 1
movies = sortrows(movies,"ReleaseDate","ascend")
disp(movies.AdjustedGross)
plot(movies.ReleaseDate, movies.AdjustedGross,"-");
xlabel(‘Release Date’);
ylabel(‘Adjusted Gross Revenue’);
title(‘Adjusted Gross Revenue vs. Release Date’); I am encountering an issue with the y-data in a MATLAB plot not being correct. Here are the steps to reproduce the issue:
Load the data from movies.txt and releaseDates.txt using readtable.
Modify the variable names in the release table.
Ensure the Title variable in the release table matches the Title variable in the movies table.
Join the two tables using the Title variable as the key.
Convert the ReleaseDate to datetime format.
Sort the movies table by ReleaseDate in ascending order.
Plot AdjustedGross against ReleaseDate.I have confirmed there are no missing values in the AdjustedGross column and that the data types for ReleaseDate and AdjustedGross are correct. The plot is still not displaying the y-data as expected.
here is the code
This code sets up the activity.
movies = readtable("movies.txt","TextType","string");
release = readtable("releaseDates.txt","TextType","string");
movies
release.Properties.VariableNames(1) = "Title"
release.Properties.VariableNames(2) = "ReleaseDate"
release.Title = movies.Title
movies = join(movies, release, ‘Keys’, ‘Title’);
Task 1
movies = sortrows(movies,"ReleaseDate","ascend")
disp(movies.AdjustedGross)
plot(movies.ReleaseDate, movies.AdjustedGross,"-");
xlabel(‘Release Date’);
ylabel(‘Adjusted Gross Revenue’);
title(‘Adjusted Gross Revenue vs. Release Date’); matlab, fundamentals, issue, wrong answer MATLAB Answers — New Questions