I need create a plot like this:(similar)
Data:
category= { } with 90x1 could be Beef & Pork, Chicken & Fish or Salads
fat and calories is a 90x1 too
I try to do:
figure(1)
xlabel('Fat')
ylabel('Calories')
if category=="Beef & Pork"
plot(fat, calories, 'd')
end
if category=="Chicken & Fish"
plot(fat, calories, 'o')
end
if category=="Salads"
plot(fat, calories, 'x')
end
But only read the first element.

 Respuesta aceptada

Más respuestas (0)

Categorías

Preguntada:

el 26 de Jun. de 2018

Comentada:

el 26 de Jun. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by