RADIANS and DEGREES

Hi,
Is there any equivalent available in Oracle for SQL Server's built-in functions namely RADIANS and DEGREES.
Thanks
Sam

roll your own functions :
create or replace
function degrees (p_radians number) return number is
   l_result number ;
begin
   l_result := p_radians * (180/3.114159265359) ;
   return l_result ;
end;
select degrees(1) X from dual ;
X
57.2974694

Similar Messages

  • Change Labview default from Radians to Degrees

    Hey everybody, have what im hoping is a simple question.
    Is there a way to convert the default operating mode of labview from radians to degrees?
    Such as on my trusty TI-89 switching the mode from Radians to Degrees.
    Thanks fellas

    No.
    You can use the unit conversion nodes to convert radians to degrees, and vice-versa.

  • Reg. paralle and degree

    Hi,
    what is parallel and degree in oracle?
    how to find the no. of cpu's attahed?
    can we use parallel while rebulding the indexes?
    Please answer to these questions?
    Thanks in advance

    user583972 wrote:
    what is the difference between degree and parallel?There is no difference as such between parallel and degree. The old syntax for specifying the parallelism was PARALLEL (DEGREE n INSTANCES m), but the new syntax is basically PARALLEL or PARALLEL n.
    There are two attributes that relate to the parallel execution: The degree and the number of instances the statement should be executed in a Parallel Server/RAC environment.
    The parallel "degree" determines how many parallel threads or slaves are supposed to be used for parallel statement execution per database instance. So if you say parallel 2 (or in the old syntax parallel (degree 2)) then two parallel slaves will be used for execution. Note that in case sorting or grouping is used as part of the statement, or parallel DML is used, then you might end up with a second set of parallel slaves, which means you can effectively have 4 parallel slaves with a degree of 2.
    The number of "instances" determine on how many nodes of a RAC/Parallel Server the parallel slaves should be spread, each using "degree" number of slaves.
    How to find how many cpu's in this case?If you just say PARALLEL without any degree then you get the default PARALLEL degree, which is determined by the parameters PARALLEL_THREADS_PER_CPU (default usually = 2) and CPU_COUNT (which shows how many CPUs Oracle has detected on startup).
    If you have set PARALLEL_ADAPTIVE_MULTI_USER to FALSE, then the default parallel degree will be PARALLEL_THREADS_PER_CPU * CPU_COUNT. So if Oracle detects 16 CPUs and you have default for PARALLEL_THREADS_PER_CPU, then you get a default DOP (Degree Of Parallelism) of 32, which could mean up to 64 parallel slaves if sorting/grouping is included.
    Setting PARALLEL_ADAPTIVE_MULTI_USER to TRUE means that the default DOP will be reduced if multiple parallel executions are requested simultaneously.
    Note that there are other constraints like the PROCESSES or PARALLEL_MAX_SERVERS parameters that might limit the maximum number of parallel slaves that can be used.
    For further details, read e.g. the documentation:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28313/usingpe.htm#i1007254
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • How to use SDO_GEOM.WITHIN_DISTANCE with a geodetic CRS and degree as unit?

    Hi,
    I am trying to use SDO_GEOM.WITHIN_DISTANCE on geodetic data, but I don't want to use meter as unit for the tolerance. I thought I simply can set the unit to 'Degree', but this does not work:
    select SDO_GEOM.WITHIN_DISTANCE(
    MDSYS.SDO_GEOMETRY('POINT(0 0)', 4326),
    +11,+
    MDSYS.SDO_GEOMETRY('POINT(0 10)', 4326),
    +0.00000000005,+
    +'unit=Degree') from dual;+
    ORA-13291: conversion error between the specified unit and standard unit
    ORA-06512: at "MDSYS.SDO_3GL", line 985
    ORA-06512: at "MDSYS.SDO_GEOM", line 1034
    ORA-06512: at "MDSYS.SDO_GEOM", line 1049
    ORA-06512: at line 1
    +13291. 00000 - "conversion error between the specified unit and standard unit"+
    *Cause:    Cannot convert the specified unit from/to standard unit+
    for linear distance, angle, or area.
    *Action:   Check the unit specification and respecify it.+
    What am I doing wrong?
    Update: How is the specified unit used? Is WITHIN_DISTANCE trying to convert my 10 degree into a meter value? Because then I would understand why it is not working.
    Thanks,
    Tobias
    Edited by: tsauerwein on May 19, 2010 11:23 PM

    HI Tobias,
    "Degree" is an angle unit, not a distance unit of measurement. For within_distance operations you must use a valid distance unit, which are defined in sdo_dist_units view.
    if you indeed want to represent a distance unit in "decimal degree", you may try to define one for that by yourself.
    regards
    Jeffrey

  • Inverse sin cos and tan

    Hello,
    I was trying to use the the Math class in java but the sin cos and tan functions only take radians, not degrees and there doesn't seem to be any functions for finding the the inverse sin cos or tan. Is there another class for doing this or were sun just in a funny mood when they wrote it ?

    So you missed the methods "asin", "acos", "atan", "toRadians", and "toDegrees" in the API spec how?
    http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Math.html
    http://java.sun.com/j2se/1.4.1/docs/api/java/lang/StrictMath.html
    Note that the to* methods are fairly new additions to the API. Conversion between radians and degrees isn't hard anyway ... multip</B>r divide by 180/Math.PI.

  • Prime calculator stuck in radians?

    Hi there, this is my first post on this forum site and hopefully I do all this correct. But my question is how do you switch between radians and degrees (as far as modes) on the HP Prime calculator? I thought it was touch the top right corner and then touch either of the symbols? I could have swore that was the way i did it before; but today when I went to switch to degrees the screen was unresponsive when that drop down menu would appear. So then from the CAS screen I went into settings and tried to change the mode there, and I could select between the two but when I would go back to the CAS screen and then back to the settings screen to see if it did indeed stay, the drop down bar would say radians again... I've tried the reset button on the back and no luck. Is there some setting that I might have turned on so it won't change between modes? I also haven't messed with the firmware at all; all I've done is take it out of the box and charge it up and use it. I've had it now since about last November and as far as I can remember this function used to work.
    Ok update if anyone reads this ... I have found that within the app "function" I can not switch between radians/degrees. I am just currious as to why im not able to do so if anyone would like to comment?
    Thanks, Nick
    This question was solved.
    View Solution.

    Here's one possible reason for what you were experiencing.  Each app can have its own private radian/degree setting in the "Symbolic Setup" screen.  (Shift Symb)  When an app has the angle mode set here, it usually cannot be changed elsewhere.  To restore your ability to set the angle mode in the usual three places (Home Settings, CAS Settings, and the battery icon popup box), press Shift Symb and change the angle setting there to "System".
    -Joe-

  • Polar to rectangular conversion

    I want to enter this foumula =B2*cos(C2) Where B2=4, C2=-30
    the result I get from this formula is .617...
    The answer I'm looking for is 3.46, I know the difference has to do with radians and degrees, but I can't seem to get the answer I want using the DEGREES function.
    3.46 is the answer I get with my TI calculator set to degrees, and .617... is the answer I would get with it set to radians. I'm trying to set this up in a spreadsheet, to help speed things up. Any ideas?

    Allen,
    Thanks for the feedback. Easy to remember if you know the definition of a Radian. It's the angle formed by the portion of a circle (pie slice) where the length of the section of perimeter is equal to the radius of the circle. Of course you know from geometry that the total perimeter (circumference) is 2PiR and that is your 360 degrees.
    Regards,
    Jerry

  • Detecting Rotation Amount to Control Movie Clips

    I created a movie clip consisting of a bar and a knob.  When you click and drag the knob, the bar rotates through 360 degrees.  I want to be able to detect the degree of rotation and use that metric to control other movie clips.  The code to make the drag/rotate object work is...
    handle.knob.onPress = function(){
    handle.onMouseMove = function(){
      var angle = Math.atan2(this._parent._ymouse-this._y,this._parent._xmouse-this._x);
      this._rotation = angle*180/Math.PI;
      this.knob._rotation = -this._rotation;
      trace(angle);
      trace(angle*180/Math.PI);
    handle.onMouseUp = function(){
    if (this.onMouseMove) delete this.onMouseMove;
    I can trace the angle in radians and degrees but I don't know how to extract either value as a variable that can be used in a function to control a separate movie clip.

    assign a variable to have the value of the _rotation or angle in your onMouseMove function.   and use that variable's value wherever you like.

  • Degree of parallelism and number of files in tablespace

    Hi,
    I am trying to find out the relationship between the number of files in a tablespace and degree of parallelism. does number of files in a tablespace effect dop in parallel query. because if more files are in the tablespace so the IO of the system has increased and system has become more feverable for parallel query.
    However i looked into the formulas for calculating dop i dont find any parameter which specify how many file are there in a tablespace. please give me the formula of calculting dop in oracle.
    regards
    Nick

    Maurice Muller wrote:
    Did you run this test on an Exadata Storage Server? How much IO throughput did you have per process? No. That one is from a RAC cluster of DL580 G5s. There were 7 in that query, but I had 8 total. One was down at the time due to hardware failure.
    The >500 DOP is from a RAC cluster of 16 DL580s (so DOP=512) to be exact.
    The amount of I/O you get per slave (or talking aggregate) is dependent on what the query execution plan is. Simple things like select count(*) are very I/O intensive, but not very CPU/memory intensive. The blocks are read, counted and then discarded. A group by or hash join will be more CPU intensive and less I/O intensive. Over the course of a given query execution the use of resources will generally alternate. Heavy on I/O at first, then more CPU heavy for a hash join, etc.
    How much IO throughput do you recommend per CPU(Core) for an Oracle DWH server?As a rule of thumb I size systems to have around 100MB/s of physical I/O throughput per CPU core. So for a four socket quad core DL580 G5 (16 cores) target 1600MB/s, which works out nicely to four 4Gbps FCP ports. Do note if you are using compression you will be delivering a logical I/O rate higher than the physical based on the compression ratio for the data.
    With Exadata, things are a little different. Since the CPUs that do the physical I/O are not at the DB layer, no wait I/O shows up in the metrics. The db blocks are transferred to the host using iDB protocol, not FCP like most external storage.
    For instance, here is a screen capture of a HP Oracle Database Machine running a single query that uses PQ
    http://structureddata.org/files/life_without_waitio.png
    The problem is that most storage system are, from my point of view, much to slow compared to the available CPUs performance. In most cases people don't realise that the IO throughput required for large parallel queries is not comparable with the one required for an OLTP system having >90% cache hit ratio.Very true. Also discussed here:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28313/hardware.htm
    Regards,
    Greg Rahn
    http://structureddata.org

  • Whats the difference between producing output and returning a value?

    I've just started learning Java. I am having difficulty understanding what it means to "return a value".
    If a method has an argument, then whenever this method is called the variable named will be used for output.
    If you create a method to return a new value rather than display it, you would exchange the 'void' for 'double' e.g. public static double predictRaise(double moneyAmount). My book states that a return statement causes a value to be sent from a called method back to the calling method. Their example is not clear to me. Here is what they show for when only 'output' is produced:
    <code>
    Public static void predictRaiseUsingRate (double money, double rate)// 2 arguments
              double newAmount;
              newAmount = money * (1 + rate);
              System.out.println (?With raise, new salary is ? + newAmount);
    </code>
    And their example of a returned value:
    <code>
    public static double predictRaise(double moneyAmount)
              double newAmount;     
              newAmount = moneyAmount * 1.10;
              return newAmount;
    </code>
    Their explanation: "This return statement causes a value to be sent from a called method back to the calling method. The value stored in newAmount is      sent back to any method that calls predictRaise() method."
    For some reason this is just not sinking in. Does anyone have a better example/explanation? I could not find anything with a better explanation in archives.
    Are they tring to tell me: "if the original method declares an argument that is declared as 257 in the method call, that when that same method is called again, it will always be 257? But if you do a return statement, any changes in the return statement will now always be used in all methods calling that method?
    Thanks for your help.
    Gizelle

    To use an older and possibly more easily understood terminology. Methods can either be "functions" almost in the mathematical sense or they can be "procedures" in the sense of a process.
    A function is a mapping between a "domain", its arguments, and a "range", its result. An example of a function in mathematics is cosine, which takes an argument in degrees or radians and returns a result between -1 and 1. In java functions are just methods that declare a result type. eg. public int foo(int arg).
    A procedure is a program that doesn't return any result, it's not something that fits well into mathematics, but it occurs all the time in real life. For example, walking the dog does not map something from a domain to a range, but it may have some side effects, which is why I always carry a plastic bag with me. Procedures in java are methods that are declared as "void". eg. public void foo(int arg).
    All the well known arithmetic operations are functions, they take one or two arguments in the domain of numbers and return a result in the same set. Eg, x = a + b, the operator + is a function that takes two numbers, calculates the arithmetic sum of them and returns a result. Functions are very handy since you can string them together, eg. z = a+foo(b)*max(c+d). This doesn't work with procedures.
    Procedures are often used for much longer and more involved operations, there is no immediate result, but a lot of things may occur while they run. Data may be printed on a screen or paper, a database or file may get updated and email messages might get send. But no other expession is waiting for a resulting value so it can carry on. Procedures may also happen asynchonously, ie. outside the timeframe of their caller, see threads. Functions cannot do this, or if they do, they turn into procedures by throwing away their result. For example, you can schedule a procedure to send an email to your friends every Friday inviting them to go out for drinks, but you don't wait around for the result.
    In a way functions are a bit like phone calls, you wait for a response, procedures are more like snail mail, you send it off and check on what happened later.
    I hope this helps.

  • Open Tiff, rotate, resize and save as JPEG (using JAI)

    I 'm having a hard time getting my arms around the JAI classes to perform
    this transform. I've looked at the tutorial and api, etc and did not get
    very far.
    I have the code to open the TIFF, and save as a JPEG. My question is how to
    go from there to do the manipulations (rotate, resize)?
    If anyone knows how to do this with JAI classes, please let me know.
    Thanks,
    Bill Pfeiffer
    My code:
    try
    SeekableStream input = new FileSeekableStream("C:\\S1000000.TIF");
    FileOutputStream output = new FileOutputStream
    ("C:\\S1000000.jpg");
    TIFFDecodeParam TIFFparam = new TIFFDecodeParam();
    ImageDecoder decoder = ImageCodec.createImageDecoder("tiff",
    input ,TIFFparam);
    JPEGEncodeParam JPEGparam = new
    JPEGEncodeParam();
    ImageEncoder encoder = ImageCodec.createImageEncoder
    ("jpeg",output,JPEGparam);
    RenderedImage ri = decoder.decodeAsRenderedImage();
    encoder.encode(ri);
    input.close();
    output.close();
    catch (IOException e)
    e.printStackTrace();

    For Rotation....
    1) add the following function to your code.
    private RenderedImage rotate(int degrees, RenderedImage src, Interpolation interpRotate) {          
                             try {               
                                       float radians = (float)(degrees * (Math.PI/180.0F));
                                       ParameterBlock pb = new ParameterBlock();
                                       pb.addSource(src);
                                       pb.add(0.0F);
                                       pb.add(0.0F);
                                       pb.add(radians);
                                       pb.add(interpRotate);
                                       src = (RenderedImage)JAI.create("rotate", pb, null);
                                       pb = new ParameterBlock();
                                       pb.addSource(src);
                                       pb.add((float)-(src.getMinX()));
                                       pb.add((float)-(src.getMinY()));
                                       pb.add(interpRotate);
                                       return (RenderedImage)JAI.create("translate", pb, null);
                             }catch (Exception e) {               
                                       return src;
    2. call this function before the "encoder.encode(ri);" line in your code. I pass "new InterpolationBilinear()" for the interpolation parameter of the function.
    For scaling...
    1) add the following lines to your code after or before you rotate the image.
    ParameterBlock pb = new ParameterBlock();
    pb.addSource(ri);
    pb.add(1.1F); //play with these 4 lines to make the image bigger or smaller (1.0F is actual size)
    pb.add(1.1F);
    pb.add(0.0F);               
    pb.add(0.0F);               
    pb.add(new InterpolationNearest() );
    t = (RenderedImage) JAI.create("scale",pb,null);
    hope this helps. Just play with it a bit. You'll get it.

  • Calculating arc tangent of 0.12 degrees

    ActionScript really does know to be annoyed sometimes!
    I'm trying to calculate arc tangent of a number.
    I'm using the following code:
    arctg_mi = Math.atan(Math.PI/180 * 0.12)
    As you can see, I need to calculate arc tangent of 0.12
    degrees. Problem is that it just cannot be done. I'm not an expert
    of mathematics, but it seems that radian system does not behave
    like degrees system when it comes to arc tangent!
    I used Windows' Calculator, and arc tangent of 0.12 in
    degrees system is about 6.84, which is right. But when I switch to
    radian system, then convert 0.12 degrees to radians, and then try
    to calculate, I get the wrong value. Totally wrong!
    Solution? Either I am so stupid that I missed some ordinary
    procedure in all of this, or these two systems are not comparable.
    Or do I need to convert the value I get back to degrees
    system somehow?
    The easiest thing to do would be to switch Flash to degrees
    system, but that can't be done, so...
    Help, please...

    It comes out to 6.84 in Flash too, if you do it right. First
    off, degrees
    per radian is 180/Pi not Pi/180. And you want to get the
    arctangent of the
    value, which comes out in radians, then convert to degrees -
    you don't want
    to take the arctangent of the degrees....
    So:
    var degreesPerRadian = 180.0 / Math.PI;
    trace(Math.atan(0.12) * degreesPerRadian)
    6.84277341263094
    HTH
    Dave -
    Adobe Community Expert
    www.blurredistinction.com
    www.macromedia.com/support/forums/team_macromedia/

  • FFT and Tone Measurements

    Does the Express VI, Spectral Measurements and the Extract Multiple Tone Information VI return the same data?  The express VI displays the information in dB and the Extract Multiple Tone Information VI returns the amplitude in volts.  The issue is that the amplitude don't seem to match.  I am using 20log(volts) to convert to dB.  The chart shows about -14 dB and the Extract Multiple Tone Information VI returns -27 dB (volts convert to dB).
    Any help is appreciated,
    Matthew Fitzsimons
    Certified LabVIEW Architect
    LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison

    You are calculating a power spectal density in the spectral measurements Express VI.  If you configure it to calculate the spectral measurement magnitude (peak) the values will match.  The difference from the help file is:
    Magnitude (peak)—Measures the spectrum and displays the
    results in terms of peak amplitude. You typically use this measurement with more
    advanced measurements that require magnitude and phase information. The
    magnitude of the spectrum is measured in peak values. For example, a sine tone
    of amplitude A yields a magnitude spectral value of A at the sine tone
    frequency. You can unwrap the phase spectrum or convert it from radians to
    degrees by setting Phase to Unwrap phase or
    Convert to degree, respectively. If you place a checkmark in
    the Averaging checkbox, the phase of the spectrum is zero for
    averaging.
    Power spectral density—Measures the spectrum and displays
    the results in terms of power spectral density (PSD). Power spectral
    density is a scaled version of Power spectrum, where
    the power present within each spectral bin is normalized by the frequency bin
    width. You typically use this measurement to examine the noise floor of a signal
    or the power in a specific frequency range. Normalizing the power spectrum by
    the bin width makes this measurement independent of the signal duration, or
    number of samples.So, they are the same if they are the same.
    Hope that this helps,
    Bob Young
    Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
    DISTek Integration, Inc. - NI Alliance Member
    mailto:[email protected]

  • Convert degrees to decimal equivalent

    can someone help me convert 74degrees,13 minutes ,13 secs and 7degrees,14 mins,55secs to decimal degrees and radians and then convert back to degree minutes.

    import java.util.Scanner;
    public class Angles
         public static void main (String[] args)
              Scanner scan = new Scanner(System.in);
              // takes the first angles from the user
              System.out.print("Enter the Degrees of the first angle < 360: ");
              int Angle1 = scan.nextInt();
         i dont know how to continue

  • I need a sample vi that can plot a transfer function given zeroes and poles (It should allow the user to input zeroes and poles). It should be done in the S domain.The user should be allowed to put poles and zeroes, with frequency

    I need a sample vi that can plot a transfer function given zeroes and poles (It should allow the user to input zeroes and poles). The user should be allowed to put poles and zeroes, with frequency. DONE IN S DOMAIN.

    I have created a VI (LabVIEW 6.1) that does what you want. Note that the poles and zeros have to be entered correctly that is in Rad/s and typically with negative real part. The VI offers you all options for lin/log frequency axis, magnitude in dB or not, phase in Radians or Degrees etc...
    The VI is written with "academic" in mind, so it is not optimized for performances but (hopefully) for clarity. I hope this will work for you.
    Attachments:
    S-Domain_Transfer_Function_from_Poles-Zeros.vi ‏167 KB

Maybe you are looking for