cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Bug in Worksheet

FlyingKiwi
1-Visitor

Bug in Worksheet

I have two worksheets attached. The worksheet called "Issue1" gives the final array's as a single number (Equal_Count and LessThanCount). The other worksheet called "array count comparison - Ver 2" gives array's for the array's as I would have expected inthe Issue1 worksheet. Would anybody please let me know what I am doing wrong?

Thanks,

Matt

ACCEPTED SOLUTION

Accepted Solutions

That's why I thought I could just augment them together. Perhaps not very elegant but it works. I am always open to better ways of doing things though.

Thanks for your help and expertise.

Matt

Yes that is a valid option and would work, but what if there is zero (condition not met). Are you still happy to show the corresponding value even though the condition hadn't been met?

Just a thought.

Mike

View solution in original post

8 REPLIES 8

Hello!

I corrected the file "Issue_1". See attachment.

Hi Vladimir,

Any chance you could save your solution in another version of MathCAD. I am currently using MathCAD 13. And thank-you for looking into this wee issue for me. It was driving me mad!

How did you upload the worksheet in the first place?

Mike

I have attached the worksheet you require in M11 format.

A quick note:- Your worksheet doesn't seem to make sense.

For example your have a function which is meant to count the number of times z occurs in x, but all you return is the count output, surely you would require to know which value of that the count corresponds to.

Thanks Mike. What did you change to make Issue_1 work? Is it in the way I have set-up the worksheet?

As for knowing what value the count is attributable to, I was just going to augment them together. z is the array of distinct values that I am comparing with the array of all data values which may have repeats. When I count how many values are the same or how many values are less, both are based on z and will have the same row index. That's why I thought I could just augment them together. Perhaps not very elegant but it works. I am always open to better ways of doing things though.

Thanks for your help and expertise.

Matt

Mike, I found what you changed. Sorry about that.

That's why I thought I could just augment them together. Perhaps not very elegant but it works. I am always open to better ways of doing things though.

Thanks for your help and expertise.

Matt

Yes that is a valid option and would work, but what if there is zero (condition not met). Are you still happy to show the corresponding value even though the condition hadn't been met?

Just a thought.

Mike

Matt,

I attached a file for Mathcad 13.

Announcements

Top Tags