Adept Scientific - English
The world's best software for research, science and engineering.
flag arrow
clearclear
 

 Adept Store | register Join My Adept | Flags  
Adept Scientific | Amor Way | Letchworth Garden City | Herts | SG6 1ZA | Tel: +44 (0)1462 480055  
UKusdedksvnofi
Home
Products
Training
Consultancy
 Buy Online
Downloads
Education
Support
My Adept
International |  About Us |  Contact Us |  Press Room |  Jobs


The Next Steps

• Ask us a question
• Buy Mathcad Now
• View Mathcad Pricing
• Request a Demo
• Download a Brochure
• Find out about Training
• Sign up for a Webinar
• Meet Our Team
• Read our RSS Feeds

Learn More

Mathcad Home
What can Mathcad do?
Version Comparison Chart
Mathcad for Education
Add-ons
Rave Reviews

System Requirements

Latest Information

New Features in Mathcad 14
Using Mathcad and Excel
Engineering Application
Packs

Return on Investment

Service & Support

Patches & Downloads
Chemical & Process
Engineering with Mathcad

Frequently Asked Questions
Search the Knowledge Base
Join the Discussion List
Search the List Archive
Mathcad Library

List Archives >  Mathcad List Archive >  Archive by date >  This Month By Date >  This Month By Topic

[mathcad] Re: Range Variable Problem

Search email archive for  

[mathcad] Re: Range Variable Problem
Author: Colin G Clarke    Posted: Mon, 20 Mar 2006 13:25:49 +0000
Bill

It's an easy mistake when working with indexes. You're writing data into
the same index in the new variable when you need to write the first
extracted value to index 0 of the new variable.

I think the attached does it generically.

Regards,

Colin.

(See attached file: Range Variables Test - cgc1.mcd)
The information contained in this email may be commercially sensitive and/or legally privileged. It is intended solely for the person(s) to whom it is addressed. If you are not a named recipient, you are on notice of its status. Please notify the sender immediately by reply e-mail and then delete this message from your system. You must not disclose it to any other person, copy or distribute it or use it for any purpose.

[mathcad] Re: Range Variable Problem
Author: Bill E Dumke    Posted: Mon, 20 Mar 2006 09:54:28 -0600
Thanks, Colin for the reply.

Now how do I get a polynomial regression to work with the new restricted
range vectors?

See attached.

Bill

 Attachments:
 Range Variables Test - cgc1 Poly.mcd


[mathcad] Re: Range Variable Problem
Author: Oakley, Philip SELEX UK    Posted: Tue, 21 Mar 2006 10:12:28 +0000

In your example you have made vx a range variable, not a vector [your sheet says vx:=k], so use vx[k:k
i.e. vx vector-subscript k := k
the value of the vector vx at location k is made equal to k, and as k runs through its whole range.

Philip

From: Bill E Dumke "mailto:Bill.Dumke"
Sent: Monday, March 20, 2006 3:54 PM
To: Mathcad Discussion List
Subject: [mathcad] Re: Range Variable Problem


*** WARNING ***

This mail has originated outside your organization,
either from an external partner or the Global Internet.

Keep this in mind if you answer this message.


Thanks, Colin for the reply.

Now how do I get a polynomial regression to work with the new restricted
range vectors?

See attached.

Bill


********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************


[mathcad] Re: Range Variable Problem
Author: Allen, Jonathon    Posted: Tue, 21 Mar 2006 09:58:52 -0000
Hi Bill,

A couple of points:

1) Generally, you need to make vx a vector of values rather than a range
variable i.e. declare vx[k-r:=k rather than vx:=k

2) You can't do polynomial regression on complex variables in this way.
If you think about it, what you are trying to achieve is a polynomial
relationship between a single-valued independent variable vx and a
multi-valued (both real and imaginary parts can vary) dependent variable
vy. Unless there is a pre-determined relationship between the real and
imaginary parts, there are an infinite number of solutions. In any case,
Mathcad's regression functions only accept real arguments.
If, as might be implied by the "magp" variable name in your sheet, you
are attempting to obtain a polynomial fit between the magnitude of the
complex number vy and the variable vx, this can be achieved but
obviously you'll need to create a new vector of magnitudes first and
then apply the regression process using this new vector.

Hope this helps,

Regards,
Jonathon

From: Bill E Dumke "mailto:Bill.Dumke"
Sent: 20 March 2006 15:54
To: Mathcad Discussion List
Subject: [mathcad] Re: Range Variable Problem

Thanks, Colin for the reply.

Now how do I get a polynomial regression to work with the new restricted
range vectors?

See attached.

Bill

For further information on Renault F1 visit our web site at www.renaultf1.com.

WARNING: please ensure that you have adequate virus protection in place before you open or detach any documents attached to this email.

This e-mail may constitute privileged information. If you are not the intended recipient, you have received this confidential email and any attachments transmitted with it in error and you must not disclose, copy, circulate or in any other way use or rely on this information.

E-mails to and from the Renault F1 Team are monitored for operational reasons and in accordance with lawful business practices.

The contents of this email are those of the individual and do not necessarily represent the views of the company.

Please note that this e-mail has been created in the knowledge that Internet e-mail is not a 100% secure communications medium. We advise that you understand and observe this lack of security when e-mailing us.

If you have received this email in error please forward to: "is.helpdesk" quoting the sender, then delete the message and any attached documents

[mathcad] Re: Range Variable Problem
Author: Oakley, Philip SELEX UK    Posted: Tue, 21 Mar 2006 10:19:49 +0000

After correcting the Vx, you then have the Mathematical problem that there are NO polynomial solutions (integer positive powers) where real values of 'x' produce complex results, so the regress fails!

Philip

From: Oakley, Philip (SELEX) (UK)
Sent: Tuesday, March 21, 2006 10:12 AM
To: ''
Subject: RE: [mathcad] Re: Range Variable Problem


In your example you have made vx a range variable, not a vector [your sheet says vx:=k], so use vx[k:k
i.e. vx vector-subscript k := k
the value of the vector vx at location k is made equal to k, and as k runs through its whole range.

Philip

From: Bill E Dumke "mailto:Bill.Dumke"
Sent: Monday, March 20, 2006 3:54 PM
To: Mathcad Discussion List
Subject: [mathcad] Re: Range Variable Problem


*** WARNING ***

This mail has originated outside your organization,
either from an external partner or the Global Internet.

Keep this in mind if you answer this message.


Thanks, Colin for the reply.

Now how do I get a polynomial regression to work with the new restricted
range vectors?

See attached.

Bill


********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************


[mathcad] Re: Range Variable Problem
Author: Colin G Clarke    Posted: Tue, 21 Mar 2006 13:08:19 +0000
Bill

The regression is failing because you are trying to use a range variable as
a vector. Annoyingly, MathCad won't do this.
It is a bit of a pain getting the values into a vector, the attached does
it.

You have run into another problem, in that regress won't take values with
imaginary parts.

I don't use complex numbers much, and I have no idea how to convert them.

I thought squaring and then square rooting would have done it, but no.
Maybe someone else can help you.

Regards,

Colin.

(See attached file: Range Variables Test - cgc1.mcd)
The information contained in this email may be commercially sensitive and/or legally privileged. It is intended solely for the person(s) to whom it is addressed. If you are not a named recipient, you are on notice of its status. Please notify the sender immediately by reply e-mail and then delete this message from your system. You must not disclose it to any other person, copy or distribute it or use it for any purpose.

 Attachments:
 Range Variables Test - cgc1.mcd


[mathcad] Re: Range Variable Problem
Author: Bill Dumke    Posted: Wed, 22 Mar 2006 21:16:13 -0600
Here, I modified the problem so it only uses real data.

How do I get the polynomial regression to work with the restricted range
variable?

BTW For some reason it is taking about 4 days for my e-mails to be
posted to the list.

Would someone at Adeptscience please look into this?

This one is being sent at 9:16 PM CST U.S.A. on March 22, 2006.

Thanks, Bill

 Attachments:
 Modified Range Variable Problem.mcd


[mathcad] Re: Range Variable Problem
Author: Bill Dumke    Posted: Tue, 21 Mar 2006 20:51:18 -0600
The idea here was to find the magnitude and argument and then apply a
polynomial regression to each seperately. (Trying to use a regression
rather than a filter to get away from the time delay problem in a filter
messing up the accuracy of the argument.) The example I showed you was
an oversimplification. I am sorry it got hung up on a non-problem.
(When I wrote the original question I didn't know the regression
wouldn't work after the solution.) I have had to work on another
project here so haven't been able to keep up with the answers I get on
this list as fast as I would like to.

Is there any way to do a polynomial regression on real data after using
the method for getting around the extra zeros? That is the real
question. I will check out some of the recommendations posted so far
when I get this other project finished. Thank you all for the help. I
appreciate it.

Bill

[mathcad] Re: Range Variable Problem
Author: Allen, Jonathon    Posted: Thu, 23 Mar 2006 11:50:44 -0000
Hi Bill,

Attached is a modified file with the regression working. I've modified
r5 and magp to be functions that take arguments, so that the effects of
different polynomial order can be assessed more easily.

Regards,
Jonathon

From: Bill Dumke "mailto:billd"
Sent: 23 March 2006 03:16
To: Mathcad Discussion List
Subject: [mathcad] Re: Range Variable Problem

Here, I modified the problem so it only uses real data.

How do I get the polynomial regression to work with the restricted range
variable?

BTW For some reason it is taking about 4 days for my e-mails to be
posted to the list.

Would someone at Adeptscience please look into this?

This one is being sent at 9:16 PM CST U.S.A. on March 22, 2006.

Thanks, Bill





For further information on Renault F1 visit our web site at www.renaultf1.com.

WARNING: please ensure that you have adequate virus protection in place before you open or detach any documents attached to this email.

This e-mail may constitute privileged information. If you are not the intended recipient, you have received this confidential email and any attachments transmitted with it in error and you must not disclose, copy, circulate or in any other way use or rely on this information.

E-mails to and from the Renault F1 Team are monitored for operational reasons and in accordance with lawful business practices.

The contents of this email are those of the individual and do not necessarily represent the views of the company.

Please note that this e-mail has been created in the knowledge that Internet e-mail is not a 100% secure communications medium. We advise that you understand and observe this lack of security when e-mailing us.

If you have received this email in error please forward to: "is.helpdesk" quoting the sender, then delete the message and any attached documents

 Attachments:
 Modified Range Variable Problem_2.mcd


[mathcad] Re: Range Variable Problem
Author: Andy Spragg    Posted: Thu, 23 Mar 2006 10:43:40 +0000
"This one is being sent at 9:16 PM CST U.S.A. on March 22, 2006."
FYI, it was received here at 10:30 ish AM GMT UK on March 23, 2006



Bill Dumke "billd"
23/03/2006 03:16
Please respond to
"mathcad"


To
Mathcad Discussion List "mathcad"
cc

Subject
[mathcad] Re: Range Variable Problem






Here, I modified the problem so it only uses real data.

How do I get the polynomial regression to work with the restricted range
variable?

BTW For some reason it is taking about 4 days for my e-mails to be
posted to the list.

Would someone at Adeptscience please look into this?

This one is being sent at 9:16 PM CST U.S.A. on March 22, 2006.

Thanks, Bill








****************************************************************

Any opinions expressed in this email are those of the individual and not necessarily of RHM plc and/or any of its subsidiaries.

This email and any files transmitted with it are private, may be confidential and are for the intended recipient only. If you are not the intended recipient, be advised that you have received them in error. Please notify the sender of the error, delete all copies of them from your system and destroy any printed copies.

If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this email and any files transmitted with it.

Please rely on your own anti-virus system. No responsibility is taken by RHM plc and/or any of its subsidiaries for any damage arising out of any bug or virus infection.

****************************************************************

 Attachments:
 Modified Range Variable Problem.mcd


[mathcad] Re: Range Variable Problem
Author: Paul Bragg    Posted: Thu, 23 Mar 2006 14:13:10 +0000
Hi All

Sorry about the delay getting things on to the list. That is entirely down
to me as I have to moderate all submissions otherwise the list would be
flooded with spam. I will try harder to get submissions turned round much
more quickly.

Best Regards
Paul Bragg
Adept Scientific







Previous by date: [mathcad] Range Variable Problem (Here is the attachment), Bill Dumke
Next by date: [mathcad] Re: Range Variable Problem,  Bill E Dumke
Previous thread: [mathcad] Range Variable Problem, Bill Dumke
Next thread: [mathcad] Re: Range Variable Problem, Colin G Clarke



Ready to buy?

For more pricing information:
Visit our webstore, call us on +1 800 724 8380 or email us at info@adeptscience.com

Featured Downloads

Mathcad 14 demo
Mathcad 14 Brochure
Mathcad or Excel?
Mathcad Customer Story: Man B&W Diesel
Mathcad Customer Story: Stork Fokker Aerospace
Mathcad White Paper - Moving beyond the limitations of spreadsheets

Product Reviews

"Our work ranges from complex medical imaging research to large-scale mapping and diagrams and we need a tool that is able to handle anything we investigate. With Mathcad, we are able to manipulate and analyse our data quickly while at the same time documenting our work, for sharing and publication. We also use it for pilot studies conducted in support of research grant applications. It is an end-to-end tool for research and development."
Dr. Kenneth Castleman, President of Advanced Digital Imaging Research (ADIR), Houston, Texas

"Mathcad is an integral product for my work... With Mathcad, itís easy to disseminate design calculations because the documents look like real math. Thereís very little I canít do in Mathcad. The main benefits come from the format, which resemble a typed set of calculations. These programs are easier to develop by engineers and easier for others to follow and review since the logic is expressed in a familiar manner. The format is what places Mathcad head and shoulders above other programs of a similar function."
Andre Pavlov, Structural Engineer, Florida Department of Transportation
adept

Top of the Page

Our Privacy and Terms and Conditions Statement
All Trademarks Recognised. Copyright © 2007, Adept Scientific plc.
Site designed and maintained by Adeptise

Adept Scientific | Amor Way | Letchworth Garden City | Herts | SG6 1ZA | Tel: +44 (0)1462 480055