Hello,(adsbygoogle = window.adsbygoogle || []).push({});

Currently I have two single dimension arrays. I am interested to know if I can modify program by combining them to a matrix giving same result.

E.g.

A(X), B(Y) used for M=P*A(1)+Q*B(2)

Proposed-

A(X,Y) used for M=P*A(1,Y)+Q*B(X,2)

Program should understand that it has to multiply only X value of A to P.

where A(1,Y)=A(1), B(X,2)=B(2)

Is it possible to do like this? if yes, the how? also whether it can reduce memory utilisation?

Thanks in advance.

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Combining arrays into matrix

Loading...

Similar Threads for Combining arrays matrix |
---|

Java Representation of two-dimensional arrays in the memory |

Python Array Indexing |

C/++/# Allocating a huge boolean array fails |

C/++/# Library that supports multidimensional Arrays |

C/++/# Arrays/vectors without knowing type |

**Physics Forums | Science Articles, Homework Help, Discussion**