Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Combining matrices in a function

1 visualizzazione (ultimi 30 giorni)
Joel Schelander
Joel Schelander il 12 Apr 2021
Chiuso: Rena Berman il 6 Mag 2021
I have a 3x3 cell. Each element represents the vehicle(s) ID number of a house (a house can have one or two vehicles)..
The house A can have the following vehicle combinations.
A={173 [173,178] [173,180]
[178,173] 178 [178,180]
[180,173] [180,178] 180}
I want to combine with cell B which looks the same:
B={173 [173,178] [173,180]
[178,173] 178 [178,180]
[180,173] [180,178] 180}
So that I then have a 9x9 cell with all the possible combinations. House A and B cannot have the same values e.g. {173;173} not allowed
Later I want to combine A and B with house C (C is the same 3x3 cell). And later A,B and C with D (D is the same 3x3 cell).
A,B,C,D has an equal 3x3 matrix with values that expresses the impact the vehicle(s) has on the house called VehicleA, VehicleB, VehicleC
Is there a way to make a function that combines matrices like this?

Risposte (0)

Prodotti


Release

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by