TASK Create a variable volumes that contains the last two columns of data. You can see the size of data in the output pane to the right of your screen.

35 vues (au cours des 30 derniers jours)
and i wrote volumes = data(:,3:4) is still giving me error
  2 commentaires
John D'Errico
John D'Errico le 30 Mai 2023
Modifié(e) : John D'Errico le 30 Mai 2023
The line you wrote SHOULD put columns 3 and 4 into the array volumes. That it generates an error just means you did something we are not told.
When you get an error, show the ENTIRE error. Don't just tell us that something is still giving an error. We cannot see your screen, and we certainly cannot see into your computer.
Paste in the error message, the ENTIRE error message. So everything in red.

Connectez-vous pour commenter.

Réponses (2)

Image Analyst
Image Analyst le 30 Mai 2023
Modifié(e) : Image Analyst le 30 Mai 2023
Is data a 3-D array? What does this show"
whos data
If data is a 3-D array you need to do
volumes = data(:, 3:4, ;)
If data is a 2-D array, then your code would have worked.

OMPRAKASH
OMPRAKASH le 4 Fév 2024
Create a variable volumes that contains the last two columns of data. You can see the size of data in the output pane to the right of your screen.

Community Treasure Hunt

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

Start Hunting!

Translated by