Effacer les filtres
Effacer les filtres

hello, I am stuck at this part of my code

3 vues (au cours des 30 derniers jours)
Christian Benjamin
Christian Benjamin le 12 Déc 2022
Réponse apportée : Dongyue le 15 Déc 2022
I have to use specific data gathered in a generated cell array to properly output the data sets.
this is what i have so far
Data is the generated matrix that i have to gather data from. its size differs depending on what genre is being shown. i need help with figuring out how to splice out the specific row that corresponds with what the user wants to watch (the values in my first column that they can choose) in order to output data points from said row. i've also attached the code and excel file i am working from
MoviesinGenre = Data
Moviegenrechoice = input('Which movie do you want to watch\n(Pick one of the movie names in the given matrix)','s')
while strcmpi(MoviesinGenre(:,1),'Moviegenrechoice')
Moviegenrechoice = input('Error. Pick a movie listed in the array')
end
fprintf('The movie you have chosen is %s.\n',Moviegenrechoice)
Moviegenrechoicerow = MoviesinGenre(Moviegenrechoice,:)
  1 commentaire
Image Analyst
Image Analyst le 12 Déc 2022
I'm not seeing where you attached Data.
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:

Connectez-vous pour commenter.

Réponses (1)

Dongyue
Dongyue le 15 Déc 2022
Hi Christian,
I have updated your script, please check the attached file.
BTW, I still recommend you to use the table instead of the cell to do the data visiualization. It is much easier to use table for indexing and data processing.
Please read through the documentation for Data Table,
Best,
Dongyue

Catégories

En savoir plus sur Data Type Conversion dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by