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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

ORIGIN in Prime

AlanStevens
17-Peridot

ORIGIN in Prime

Local assignment of ORIGIN doesn't seem to work in Mathcad Prime - see attached. (Possibly this has already been reported.)

Alan

1 ACCEPTED SOLUTION

Accepted Solutions

AlanStevens wrote:

Local assignment of ORIGIN doesn't seem to work in Mathcad Prime - see attached. (Possibly this has already been reported.)

Alan

The variable ORIGIN must have the lable System - see please the attach.

View solution in original post

17 REPLIES 17

AlanStevens wrote:

Local assignment of ORIGIN doesn't seem to work in Mathcad Prime - see attached. (Possibly this has already been reported.)

Alan

The variable ORIGIN must have the lable System - see please the attach.

Thanks Valery - I'd tried labelling as Keyword, but obviously didn't try System!

If, in your file you now delete ORIGIN so it reverts to zero, the rest of the sheet doesn't automatically update - you have to explicitly select Calculate to implement the update.

Alan

We have fixed for the next release, so that you don't have to apply a label to ORIGIN for it to work.

Mona

It will be good to fix ORIGIN = 0 in Mathcad Prime 2.0, 3.0... without a possibility for users to change this value!

See too http://twt.mpei.ac.ru/ochkov/Sovet_MC/070/070_ORIGIN_Eng.htm

and http://twt.mpei.ac.ru/ochkov/Sovet_MC/260/260_ORIGIN_in_MC.gif

Valery Ochkov wrote:

It will be good to fix ORIGIN = 0 in Mathcad Prime 2.0, 3.0... without a possibility for users to change this value!

It would be better to fix ORIGIN = 1

Hmmm! Just goes to show that we each have our own preferences. Perhaps it's best to allow us the choice after all!

Alan

The perfect Mathcad work-sheet is the Mathcad work-sheet with arrays and strings variables where the answer is not depended on ORIGIN value!

Not M^<1> but M^<ORIGIN+1> etc.

Linear algebra:

In USA ORIGIN = 0

In Europe (in Russia too) ORIGIN = 1

In the World (0+1)/2=0.5

A compromise ORIGIN:=0.5 - why not?

Valery Ochkov wrote:

The perfect Mathcad work-sheet is the Mathcad work-sheet with arrays and strings variables where the answer is not depended on ORIGIN value!

Not M^<1> but M^<ORIGIN+1> etc.

Agreed!

Linear algebra:

In USA ORIGIN = 0

In Europe (in Russia too) ORIGIN = 1

In the World (0+1)/2=0.5

A compromise ORIGIN:=0.5 - why not?

Love your sense of humour!

Alan

AlanStevens wrote:

Love your sense of humour!

Alan

Thanks, Alan!

But it is not only "sense of humour"!

We for example have in Mathcad n-th derivative - n=1,2,3...

But I once was very surprised when I learned that there is a branch of mathematics, where permitted n-th derivates with n=real - 0.5 for example!

It is permitted in Mathcad MM!

AlanStevens wrote:

Valery Ochkov wrote:

It will be good to fix ORIGIN = 0 in Mathcad Prime 2.0, 3.0... without a possibility for users to change this value!

It would be better to fix ORIGIN = 1

I was in NYC 2/28-3/3/2011.

Manhattan (M) is/was for my as one matrix (M). Manhattan has the 1-st Ave and the 1-st Str. But not an Ave Zero and a Str. Zero. There is the Ground Zero in NYC :-(.

M[8,34 was my hotel (New Yorker), M[5,42 - my visit office (Knovel). Broadway is as a identity function in Mathcad.

But we have "an Ave Zero and a Str. Zero" in one Math/Computer Science-city!

I believe in South America, there were (are) some counting systems that consist of none and some, you have something to eat, or you don't. So 0.5 don't work for them, origin=0, infinity=not 0. That's pretty simple, I can deal with that.

MikeArmstrong
5-Regular Member
(To:AlanStevens)

It would be better to fix ORIGIN = 1

In a way I agree with this.

Clipboard01.jpg

Doesn't look right.

Mike

Mike Armstrong wrote:

It would be better to fix ORIGIN = 1

In a way I agree with this.

Clipboard01.jpg

Doesn't look right.

Mike

A number of programming languages allow each array to have its own index bounds, chosen so as to reflect some characteristic of the data or context; for example, one may want to index an array by latitude or temperature but only over some subset of allowable values. It's always possible to map the desired index to a 0/1 based index, but it is often more convenient (and less error-prone) to use the 'true' index.

This opens up the possibility for all kinds of user-defined origins, such as time origins being based on a calendar, for example, operating system time (eg, Unix), religious time (eg, Ussher) or cosmological time (eg, big-bang ... or steady-state ) - the latter particularly appeals to me as I think this notion of a fixed origin is somewhat quaint and old-fashioned, or indeed unique origin. Nostalgia ain't what it used to be, but I have fond memories of writing some microcode (on a bit-slice microprocessor) that changed the meaning of the 'user' machine code every so often.

Stuart

MikeArmstrong
5-Regular Member
(To:StuartBruff)

Its seems to be down to personnel preference, so yes the user should have the choice.

(on a bit-slice microprocessor)

Showing your age now

Mike

Personally, I am so used to zero based indexing that it does look right

I use zero based indexing without even thinking about it anymore. Most of the languages I have written in or still write in default to zero based arrays (or even allow nothing else), so that is my preference. I would probably be just as happy with 1 based arrays if the majority of languages used that, and that is what I was used to, but that's not the case. And the worst possible scenario would be to have to mentally switch between the two conventions every time I switched language. I would not want to have to write in VBscript, Java, C and it's later variants, Python, etc, all using zero based arrays, and then in Mathcad using 1 based arrays. That would lead to a lot of errors!

MikeArmstrong
5-Regular Member
(To:RichardJ)

Personally, I am so used to zero based indexing that it does look right

It looks right to me and probably most Mathcad users. I actually get a little thrown out when checking through work from this forum and the index has been changed.

The problem I have is when I calculate reactions for example and then want to indicate them on a sketch. Reaction zero looks a little weird and it has been queried by non-Mathcad user before now.

Mike

Here is the original letter for one of the most often quoted justifications for zero based indexing:

http://www.cs.utexas.edu/users/EWD/ewd08xx/EWD831.PDF

wayne
3-Visitor
(To:RichardJ)

I agree that the default should be 0. Even though I change the Origin to 1 in most of my work, I would still prefer to keep at 0.

What font did that that guy use, I might change to that.

Top Tags