The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 Plotting 3D Functions

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
strain17 Posted - 11/17/2003 : 4:41:02 PM
Hi,
I was wondering how you could plot 3D funtions in Origin. Lets say for example a sphere, z^2=x^2+y^2. Or if I have a function of Z in terms of sin(x) and sin(y), how would I plot that ?
I tried setting my values in a matrix as z = (x^2+y^2)^(1/2). It gave me this error:

Error, Variable "(i" not declared
Error, general compile error
Error, error(s) found in compiling function _MatrixSetValuesFromXYIJ

Any help would be greatly appreciated. Thanks.
4   L A T E S T    R E P L I E S    (Newest First)
cpyang Posted - 11/19/2003 : 2:51:29 PM
You will need to put variables x, y etc into lower case.

Also, you can use

sqrt(x^2+y^2)


CP


strain17 Posted - 11/19/2003 : 01:05:17 AM
Mike and easwar,
Thanks for the feedback. It helped me.

easwar,
Sorry for not explaining. The error should be:
Error, Variable "(x" not declared
Error, general compile error
Error, error(s) found in compiling function _MatrixSetValuesFromXYIJ

I had changed the "x" in the equation to an "i" after I saw the error. As you can see, same error occurs. I wonder why.
Mike Buess Posted - 11/18/2003 : 2:03:22 PM
You might find some useful ideas in this topic: plot a sphere.

Mike Buess
Origin WebRing Member
easwar Posted - 11/17/2003 : 9:16:50 PM
Hi,

Looks like you are using Orign version 7 or higher, and have the "Compile as Origin C and treat x^y as pow(x,y)" checkbox checked in the Set Matrix Values dialog box. Checking this box results in much faster computation of the matrix values, but the expression needs to be ANSI C compatible.

I am not sure how you got the
Error, Variable "(i" not declared
message, since your expression does now have any "i" in it.
Did you enter the expression:
(x^2+y^2)^(1/2).
with a period at the end of the expression?
You will then get the error:
Error, Variable "(1/2)." not declared
If this is what you got, you need to remove the period, and just enter:
(x^2+y^2)^0.5
Note that I used 0.5 instead of (1/2). In C, (1/2) = 0 because this is treated as integer division, and so your expression for z will be equal to 1 at all x and y values. You need to enter fractions as (1.0/2) or (1/2.0) etc. to get the floating point value you desire.

Now, Origin matrices currently support only single-valued z(x,y) functions and so you cannot plot a sphere with just one matrix.

Easwar
OriginLab.


The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000