Calculate output row by row (Data Grid)
Afficher commentaires plus anciens
Hello,
I would like to calculate all the row value based on formula and get the output row by row which at new column.because I need to use more than 10 formula by refer to the my which generated by combination as below.
I change from meshgrid to ngrid as below and I can get result as expected 400k rows.
because meshgrid cannot support more than 3 variable.
[a,b,c,d,e]=ndgrid(1:20,1:20,1:10,1:10,1:10);
data=[a(:),b(:),c(:),d(:),e(:)];
Car={'C1', 24 , 8.86 , 9.37 , 38.65 , 31.61 , 280 , 25 , -0.0033 , -0.004 , 0.058 , 45 , 0.97;...
'C2', 24 , 8.68 , 9.37 , 38.6 , 32.4 , 280 , 25 , -0.0034 , -0.004 , 0.057 , 46.5 , 0.98;...
more data
Lamp= {'Lamp1', 24 , 200;...
'Lamp', 24 , 200;...
more data
Seat={'1',147 , 32 , 145;...
'S2', 138 , 120 , 140;...
more data
and 2 more variable
ExpandData=[Car(data(:,1),:), Lamp(data(:,2),:), Seat(data(:,3),:), Bumper(data(:,4),:), Spoiler(data(:,4),:)]
Example :
Speed = C1 Column no 2 row 1 .* L1 Column 2 row 1 .* Seat Column1 row 1
anybody can help me?
Réponses (1)
Catégories
En savoir plus sur Surface and Mesh Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!