# Apparent bug: matrices with no categories cannot receive formula values

Many thanks for the clarification.

I have just checked the behavior regarding a matrix without categories in Quantrix 3.7 and 4.0 and I haven’t found a difference.

Here are the steps how you can get a matrix with a scalar only without categories (yes, it works in both versions):

1. Create a new matrix

2. Enter this formula: :=1

3. Delete all categories

4. You have one cell only in the matrix including value 1

Check the attached screenshot.

The basic rule is:

1. Add the :=[something] formula

2. Delete all categories

Dominik

I would say that this is certainly a bug if backwards compatibility with v3 is a desideratum. It works fine in v3. I hope that this is a good enough reason to make sure it continues to work.

Moreover, I would say that matrices without categories make sense conceptually. They are simply scalars. If matrices can have 3 categories, 2 categories, 1 category, why not zero categories?

I can go into more depth if necessary. Bear with me while I discuss a seemingly unrelated case. Consider what happens when you have two matrices, Matrix1 and Matrix2, which share a single category, but Matrix2 has an additional category, for a total of two categories. Now, you create a third matrix Matrix3 with the same two categories as Matrix2. You fill Matrix3 with the result of a binary operation on the first two matrices:

: = Matrix1:: + Matrix2::

Do you expect this to work? If you have used Quantrix enough, the answer is certainly yes. Even though Matrix1 has fewer categories than Matrix3, Quantrix knows to expand Matrix1 along the missing dimension (category). This saves the user from having to give Matrix1 a second, superfluous category that he or she would have to fill out manually along the second dimension:

: = Category2[PREV] // unnecessary

In high dimensions, when you have 7 or 8 or 12 categories, giving matricies superfluous dimensions is a recipe for redundancy and disaster. It is much more safe and elegant to keep matrices as small as possible and rely on Quantrix to expand missing dimensions when called upon.

How does this relate to the case of no categories? Sometimes “as small as possible” is zero. If I choose to have a matrix called “Acid required per unit of reactor feed” and I know that this value is completely invariant with respect to my various assumptions, then the matrix should have zero categories.

Now, I may have another matrix called “Amount of reactor feed” with a single category “Plant location”:

Chicago: 1400

Dallas: 1500

Springfield: 1800

If I then create a third matrix “Acid required” with the linked category Plant location, all I need to do to fill out this matrix is to say:

: = Amount of reactor feed:: * Acid required per unit of reactor feed::

This works as expected because the latter matrix is expanded appropriately along the missing dimension. Later, I may choose to add categories to it, but for now it will be treated as a scalar. This is very useful to me.

I understand that in the case above some people may choose to include “Acid required per unit of reactor feed” as an ITEM in a global “Assumptions” matrix of one category. In my experience, this approach limits flexibility, because then every assumption in that matrix must have the same matrix dimensionality as every other, in this case zero. None can have their matrix dimensionality expanded without expanding that of the others as well. I prefer to keep separate values in separate matrices and organize them using folders.

Hie Gasc

Your observation is right. I’m just wondering what you are trying to achieve.

l think that is so because the cell will not be having an address, so you can not send anything to the cell.

However if you need that for modeling, your can hide your categories and headers after-wards.

Interesting

Hi gasc,

I don’t think this is a bug, it’s Quantrix functionality because a matrix without any categories does not make sense.

If a user removes all categories from a matrix then Quantrix should provide a pop-up message indicating that there are no categories anymore.

What is your purpose for using a matrix without categories?

Dominik