New to Matlab and need help with simple calc
Show older comments
I have two matrices not in particular order for the context info. As per file attached - tab 'MatlabForum'
For given Restaurant name and Item Name i want to multiple 'Type' Ordered with dish for the given qtr.
For example
RestaurantThree Tacos 2500*50 in QuarterOne and so on up to QuarterFour
How do i do it?
For
10 Comments
Walter Roberson
on 31 Oct 2013
Sorry no file seems to be attached.
Neesha
on 1 Nov 2013
Walter Roberson
on 1 Nov 2013
Sample input extracted from file:
Restaurant Item Category Type QuarterOne QuarterTwo QuarterThree QuarterFour
RestaurantOne PaneerMasala Indian dish 1000 1000 2000 3000
Walter Roberson
on 1 Nov 2013
Your description suggests that you want to multiply something by something, but I have not been able to figure out what, or why you would want to order them. Is the data for Matrix1 a price, and the data for Matrix2 a volume (or the other way around perhaps) ? So you want to find the corresponding entries and multiply them together to get earnings ?
Neesha
on 1 Nov 2013
Neesha
on 1 Nov 2013
Neesha
on 1 Nov 2013
Neesha
on 1 Nov 2013
Andy
on 6 Nov 2013
Have you thought about just running the matrices through a sort routine to start with? A simple "bubble" sort would be quick for a short matrix, you would just have to check both the Restaurant and Item columns.
Walter Roberson
on 6 Nov 2013
ismember() or strcmp()
Answers (0)
Categories
Find more on Data Type Identification in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!