Skip to main content
1-Visitor
January 15, 2010
Question

XL Storage

  • January 15, 2010
  • 2 replies
  • 2807 views
I am trying to get an Excel storage object to display results as in the attached sheet.

Tom Gutman created the simple function which enables a range to be written/read. But I can't seem to be able to get the function to display a simple vector in the excel component.


Regards

Mike

2 replies

1-Visitor
January 15, 2010
The shape of the specified range and the shape of the passed array should match. Here you have a range that is a 3x3 square and an array that is a 5x1 column vector. Don't do that.
__________________
� � � � Tom Gutman
1-Visitor
January 16, 2010
On 1/15/2010 3:31:55 PM, Tom_Gutman wrote:

>Here you have a range that is
>a 3x3 square and an array that
>is a 5x1 column vector. Don't
>do that.

But if the range is change to say B1:B5 the first value in the column vector is displayed 5 times.


Regards

Mike
1-Visitor
January 16, 2010
Essentially a bug in Mathcad's implementation. If one of the dimensions of the data array is one, the remaining dimension, whether the first or the second, is arrayed along Excel columns rather than matching the shape of the data.

Here's a version of the Excel storage component that does it's own indexing so as to properly match shapes.
__________________
� � � � Tom Gutman
1-Visitor
January 15, 2010
On 1/15/2010 11:06:42 AM, Armo wrote:
>I am trying to get an Excel
>storage object to display
>results as in the attached
>sheet.
>
>"Not sure why they are displayed like this".
>
>Regards
>
>Mike
__________________

The empty XLS are made NaN and displayed 0. Maybe you just need to read/write XLS globally, i.e: peak/poke ... work in Mathcad and spool back to XLS. Once read from XLS, and if you need NaN, force in Mathcad. The way it shows seems all correct, but NaN is not equal to 0 !

jmG



1-Visitor
January 15, 2010
Not sure I understand what you mean. At the moment the XL function will only display an Array correctly.

Regards

Mike