Is there a function to output the crossing point of two plotted lines
I got some data plotted on a graph, I need to find the crossing point of the plotted lines on the graph (The plotted data curves are not linear lines) and detect it by an indicator. I could compare the to data arrays plotted and output the two closest data numbers, but the really crossing pionts is sertainly an intercept of two Interpolated values made by the graph, wich are not in my data buffers. any suggestions will be full Stared
Zamzam
HFZ
I only did a cursory look and didn't find any built-in function that jumped up screaming "I'm it! I'm it!", but that doesn't mean something doesn't exist given the large number of functions available with LabVIEW. An alternate solution is to use linear interpolation between successive points. If the points are close together then you can assume a straight line between the points and break this down to the simple case of finding the intersection of two lines, which is trivial. Not sure how computationally intensive of an algorithm this would be, and there would clearly be some error involved, and you will need to determine if the error is tolerable for you.
Similar Messages
-
Is there a function to predict the next point accoding to the known point?
For example
ten points arranged in a parabola,
is there a function to predict the coordinates of the six point behind according to the four points in front of?The ability to predict data values is predicated on your data having some sort of inherent structure. In cases where your data has that structure, curve fits can be very helpful. However, if your data does not have any inherent structure, or is too noisy to
be able to see the structure, you can run curve-fits and still get results
that look reasonable. Unfortunately those results would probably correlate better with the
phase of the moon than they would what you are measuring. No matter how fancy, mathematics can only predict a probable value based on what it was given - and as in all things computer: GIGO. Hence, when working with this sort of thing, I always bear in mind this definition of a pocket calculator:
"...a device that can divide a ball park estimate by a wild-ass guess and come up with an answer accurate to 13 decimal places..."
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps -
Is there a function to open the outlook mail and to attach certain..
Hello,
Is there a function to open the outlook mail and to attach certain selected files?here is a code snippet from one of our programs
data: out type ole2_object,
outmail type ole2_object,
att type ole2_object,
atts type ole2_object.
create object out 'Outlook.Application'.
call method of out 'CREATEITEM' = outmail
exporting
#1 = 0.
set property of outmail 'SUBJECT' = 'Smartform Output from SAP'.
call method of outmail 'ATTACHMENTS' = atts.
call method of atts 'ADD'
exporting
#1 = p_file.
call method of outmail 'DISPLAY'.
in our case, we save the data to a local file with the path p_file.
so, we create the attachment on a local drive, at path p_file
we open outlook
we create a mail item
we set the subject
we add the attachment
and we call disply, to pop the email up for any changes the user wants to make.
in other programs we also use
set property of outmail 'TO' = alvline-prc_email.
to set the TO address of the email
hope this helps -
IS THERE A FUNCTION TO RETURN THE NUMBER OF MONTHS OR DAYS?
I know that you can do a months between function between 2 dates divided by 12 and get years but is there a function that can return the number of months between 2 dates or the number of days between 2 dates in a select statement for a report? These 2 dates are entered in an Oracle forms.
I have 2 dates.
BEG_SVC_DT 30-JUL-1995 DATE FORMAT
END_SVC_DT 981007 VARCHAR2 FORMAT Positions 5 and 6 are the days.
I must subtract BEG_SVC_DT from END_SVC_DT.
In PLSQL I add 31 to 07 and get 38. I subtract 30 from 38 and get 8.
or I have 2 dates
BEG_SVC_DT 10-JAN-2003 DATE FORMAT
END_SVC_DT 050924 VARCHAR2 FORMAT Positions 5 and 6 are the days.
I must subtract BEG_SVC_DT from END_SVC_DT.
In PLSQL I subtract 10 from 24 and get 14.
In both scenarios the end_dt field must be VARCHAR2 because the user has to enter the word 'PRESENT' . Is there a function in SQL that would compute the
number of days between 2 dates?
Is there a function to get the number of months between 2 dates?
I have 2 dates.
BEG_SVC_DT 12-JUL-2004 DATE FORMAT
END_SVC_DT 050807 VARCHAR2 FORMAT Positions 3 and 4 are months.
I must subtract BEG_SVC_DT from END_SVC_DT
JUL is the 7th month.
In PLSQL, I subtract 07 from 08 and get 01
Or I have 2 dates
BEG_SVC_DT 13-NOV-2004 DATE FORMAT
END_SVC_DT 050429 VARCHAR2 FORMAT Positions 3 and 4 are months.
I must subtract BEG_SVC_DT from END_SVC_DT.
NOV is the eleventh month. 04 is less than 11.
In PLSQL I have to add 12 to 04 and subtract 11 from 16 to get 05.
In both scenarios, the end_dt field must be VARCHAR2 because the user has to enter the word 'PRESENT'. In SQL, is there a function to compute the number of months between 2 dates?
I am doing my calculations this way because this is the way that the user has been doing them when they created the report manually.
The database that I am using is Oracle 9.2.0.6
Report Writer Report Builder 6.0.8.22.0
Forms 6.0.8.22.1In your example:
BEG_SVC_DT 30-JUL-1995 DATE FORMAT
END_SVC_DT 981007 VARCHAR2 FORMAT Positions 5 and 6 are the days.
I must subtract BEG_SVC_DT from END_SVC_DT.
In PLSQL I add 31 to 07 and get 38. I subtract 30 from 38 and get 8.
Where is the "31" depending on, on year and month of BEG_SVC_DT or END_SVC_DT?
What would be the answer for the following example
BEG_SVC_DT 25-FEB-1995 DATE FORMAT
END_SVC_DT 980407 VARCHAR2 FORMAT
Do I add 28 (=number of days in FEB-1995),
or 30 (=number of days in APR-1998),
or 31 (= max number of days in any month?) -
Is there a function to get the IP of this remote system
Hello EveryBody
Currently I have an application that runs on our network. When someone logs on to the network it checks there system and gets the pc name. I would like to also get the IP address of that system. As well I may later like to ping that computer.
1) Is there a function to get the IP of this remote system?
2) IS the a function to ping a remote system and receive back the response?
Thanks a lot.
RHello EveryBody
Currently I have an application that runs on our
network. When someone logs on to the network it
checks there system and gets the pc name. I would
like to also get the IP address of that system. As
well I may later like to ping that computer.
1) Is there a function to get the IP of this remote system?
2) IS the a function to ping a remote system and
receive back the response?Is this lan only?
Because if wan or internet then the remote computer would have to have an address that is reachable from your computer. For the internet this would mean it would have to be public. And for a wan the IP would have to be unique across the wan. -
Is there any function to change the width of forms'graphic ?
Hi All,
Is there any function to change the width of forms'graphic ?
May be like set***property.
Thanks,
ke xiongNo. Graphics cannot be handled at runtime.
Francois -
Is there any function to change the width of froms'graphic ?
Hi All,
Is there any function to change the width of froms'graphic ?
May be like set***property.
Thanks,
ke xiongHi;
For your issue i suggest close your thread here as changing thread status to answered and move it to Forum Home » Application Development in PL/SQL » Forms which you can get more quick response
Regard
Helios -
Is there any function module getting the cpu type?
Is there any function module getting the cpu type?
I guess the database server...
I would like to get the SAP system cpu type as done in transaction st06 under system information.
Thanks. -
Is there any function to get the name of the days?
Hi,
I'm using oracle 10.2.0.1.0
Is there any function to get the days of the week?
like i need to get sunday,monday,tuesday.....saturday.
I know i can use union and select the name from dual one by one.
But just want to know whether there is any other way.
I need to show the 7 days in a poplist in my form, thats the requirement
ThanksDavid_Aldridge wrote:
BluShadow wrote:
Note: you may want to include "fm" in the format mask, otherwise the name of the day is padded with spaces:
SQL> ed
Wrote file afiedt.buf
1 select replace(to_char(dt,'Day'),' ','*') as fmt1
2 ,length(to_char(dt,'Day')) as length_fmt1
3 ,replace(to_char(dt,'fmDay'),' ','*') as fmt2
4 ,length(to_char(dt,'fmDay')) as length_fmt2
5 from (select TRUNC(SYSDATE ,'DAY')+Level-1 dt
6 from dual
7 connect by Level<8
8* )
SQL> /
FMT1 LENGTH_FMT1 FMT2 LENGTH_FMT2
Monday*** 9 Monday 6
Tuesday** 9 Tuesday 7
Wednesday 9 Wednesday 9
Thursday* 9 Thursday 8
Friday*** 9 Friday 6
Saturday* 9 Saturday 8
Sunday*** 9 Sunday 6
7 rows selected.
SQL>
I think you should use a pl/sql function for this.
Nah ... just joking.
I'd be tempted to just use a union all statement to return the seven literals. People will look at it and know exactly what it does.Yeah, agreed, I was just demonstrating that the format mask of a to_char(..., 'Day') pads with spaces, which seems to have been missed in the above answers. ;) -
Are there any functional differences between the trial and the paid version?
Are there any functional differences between the trial and the paid version for Labview 2009? Thank you.
Solved!
Go to Solution.This outlines the limitations of the eval version of Labview: Limitations of the LabVIEW Evaluation Version
Cheers,
Misha -
The intersection point of two lines in 3D
How to calculate the intersection point of two lines in 3D?
source code!this is actually a rather easy operation. lets look at some basic properties of lines / vectors in 3D space:
1. If two lines intersect at a single point, then there must be exactly one plane in which the two lines are co-planar. This is pretty trivial to prove, but I won't bother here, because you can google to find out that two vectors that extend from a common point define a single plane.
2. If you take the cross-product of two vectors, the resulting vector is guaranteed to be perpendicular to both lines (this is a basic property of a cross-product). If the two lines intersect, then this cross-product will be the normal vector to the plane in which both lines lie.
3. Now transform (rotate) yours space such that your z-axis becomes parallel to the normal vector of that plane.
Now, the parametric equation for a line in 3D space is this:
(x, y, z) = (xo, yo, zo) + k(xd, yd, zd)
After you have transformed your space, you will notice that the equation of each line will now be
(x, y, z) = (xo, yo, zo) + k(xd, yd, 0)
If zo is equal for both lines, then the two lines intersect. Otherwise, the two lines do not intersect.
if the intersection exists, then to solve for it, you ignore the z coordinate, and treat it like a two dimensional system:
(x, y) = (xo, yo) + k(xd, yd)
you can use the basic 2D formula y - yo = m(x - xo), or y = m(x - xo) + yo
you can calculate m = yd / xd.
which simplifies to y = mx -mxo + yo, or 0 = mx - y + (yo - mxo)
you now have two equations of the form Ax + By + C = 0.
From there, you can use Cramer's rule to find the intersection of the two lines.
It sounds kind of complicated when you read it as I have presented it, but it's actually extremely easy to write a program for, because each step is simple mathematic operation with basically no decisions involved (hence no if-structures, except at the one point where you actually need to determine if the lines intersect).
So to reiterate, the steps required are:
1. Check if lines are parallel. If yes, check if they are the same line, and then stop.
2. If not parallel, cross-multiply the direction vectors of each line.
3. Rotate your space such that z is parallel with cross-product of lines
i. dot-product of z axis (0, 0, 1) with cross-product of lines gives angle*
ii. cross-product of z axis (0, 0, 1) with cross-product of lines gives axis of rotation.
iii. rotate your lines (i.e. point and direction vector) about that axis by negative of ange determined in (i).
4. if z value of points from both lines is the different, no solution. stop.
5. otherwise, apply Cramer's rule.
6. done.
* obtaining the angle of rotation with the dot product relies on the angle being less than 90 degrees, so check if z value of normal vector is + or -, and then perform dot product and cross-product on appropriate + or - z vector.
- Adam -
Problems finding the interception point of two lines
Hi there,
I've written a class "Linie", which extends the Line2D.Float class, and added a method to determine the interception point of two lines.
One of the two lines can be anything except horizontal and vertical, the other one (which is the one that is passed to the method) can only be horizontal or vertical (I hoped this would make it easier).
public Point schneidet(Linie l){
Point schnitt = new Point();
float m = (y1-y2)/(x1-x2);
int n = Math.round(y1-(x1*m));
if (l.y1==l.y2){ // Is line l horizontal?
int poX = Math.round((l.y1-n)/m);
schnitt.setLocation(poX,(int)l.y1);
else if (l.x1==l.x2){ // Is line l vertical?
int poY = Math.round((m*l.x1)+n);
schnitt.setLocation((int)l.x1,poY);
return schnitt;
}The equation of a line is
y = m*x + n.
Because the line l can only be horizontal or vertical, one coordinate of the interception point is always clear from the beginning, the other one is supposed to be calculated and stored in poX or poY.
But this is where the method doesn't do what it's supposed to. There must be some mistake inside the calculation with the slope (m) and n. Any ideas?Why so complicated? Are the lines real lines (straight connections between 2 points) or curves? If they are lines, you just need to inspect the coordinates of all 4 points (2 * 2 end points) and show if the points are "within" the other points ...
Intersection point of two lines
Line Intersection and its Applications
SIMPLE ALGORITHMS I - INTERSECTION OF LINES -
Is there any function that output address by inputing the address no.?
Is there any function that accept an address number as input paramenter and return an address so that I don't need to build it myself?
Thanks!FU ADDRESS_INTO_PRINTFORM ADDRESS_TYPE
Text
Address type: 1,2,3 or ' '(default)
Description
There are three address types:
Address type '1': 'Normal' address (company or organization); the address structure used in most SAP applications as 'Address'.
Address type '2': Address of a person
Address type '3': Work address, usually the address of a contact person in a company
The default address type SPACE is treated as type '1' and is required for the upwards compatibility of the function module.
The interface parameters ADRSWA_IN and ADRSWA_OUT are only used in address type SPACE.
The other address types use:
ADDRESS_1 or ADDRESS_2 or ADDRESS_3 for the attributes, and
SENDER_COUNTRY, RECEIVER_LANGUAGE, NUMBER_OF_LINES, STREET_HAS_PRIORITY and LINE_PRIORITY for control.
The parameters COUNTRY_NAME_IN_RECEIVER_LANGU, LANGUAGE_FOR_COUNTRY_NAME and NO_UPPER_CASE_FOR_CITY are address type-independent.
The address attributes can be read directly instead of being passed in the structures ADDRESS1/2/3, if the address is in the Central Address Management tables.
The Business Address Services keys must be passed instead of the structures ADDRESS1/2/3:
Address type 1: ADDRESS_NUMBER
Address type 2: ADDRESS_NUMBER and PERSON_NUMBER
Address type 3: ADDRESS_NUMBER and PERSON_NUMBER
The following parameters are used (Import) or filled (Export):
Address type 1
Import parameters:
ADDRESS_1
ADDRESS_TYPE
ADDRESS_NUMBER
SENDER_COUNTRY
RECEIVER_LANGUAGE
NUMBER_OF_LINES
STREET_HAS_PRIORITY
LINE_PRIORITY
COUNTRY_NAME_IN_RECEIVER_LANGU
LANGUAGE_FOR_COUNTRY_NAME
NO_UPPER_CASE_FOR_CITY
Export parameters:
ADDRESS_PRINTFORM
ADDRESS_SHORT_FORM
ADDRESS_SHORT_FORM_S
ADDRESS_DATA_CARRIER
ADDRESS_DATA_CARRIER_0
NUMBER_OF_USED_LINES
NAME_IS_EMPTY
ADDRESS_NOT_FOUND
ADDRESS_PRINTFORM_TABLE
Address type 2
Import parameters:
ADDRESS_2
ADDRESS_TYPE
ADDRESS_NUMBER und PERSON_NUMBER
SENDER_COUNTRY
RECEIVER_LANGUAGE
NUMBER_OF_LINES
STREET_HAS_PRIORITY
LINE_PRIORITY
COUNTRY_NAME_IN_RECEIVER_LANGU
LANGUAGE_FOR_COUNTRY_NAME
NO_UPPER_CASE_FOR_CITY
Export parameters:
ADDRESS_PRINTFORM
ADDRESS_SHORT_FORM
ADDRESS_SHORT_FORM_S
ADDRESS_DATA_CARRIER
ADDRESS_DATA_CARRIER_0
NUMBER_OF_USED_LINES
NAME_IS_EMPTY
ADDRESS_NOT_FOUND
ADDRESS_PRINTFORM_TABLE
Address type 3
Import parameters:
ADDRESS_3
ADDRESS_TYPE
ADDRESS_NUMBER und PERSON_NUMBER
SENDER_COUNTRY
RECEIVER_LANGUAGE
NUMBER_OF_LINES
STREET_HAS_PRIORITY
LINE_PRIORITY
COUNTRY_NAME_IN_RECEIVER_LANGU
LANGUAGE_FOR_COUNTRY_NAME
NO_UPPER_CASE_FOR_CITY
Export parameters:
ADDRESS_PRINTFORM
ADDRESS_SHORT_FORM
ADDRESS_SHORT_FORM_S
ADDRESS_DATA_CARRIER
ADDRESS_DATA_CARRIER_0
NUMBER_OF_USED_LINES
NAME_IS_EMPTY
ADDRESS_NOT_FOUND
ADDRESS_PRINTFORM_TABLE
Address type SPACE (default value; the previous interface up to Release 3.0B):
Import parameters:
ADRSWA_IN
ADDRESS_TYPE
ADDRESS_NUMBER (only for special cases such as Japan)
COUNTRY_NAME_IN_RECEIVER_LANGU
LANGUAGE_FOR_COUNTRY_NAME
NO_UPPER_CASE_FOR_CITY
Export parameters:
ADRSWA_OUT
NAME_IS_EMPTY
ADDRESS_PRINTFORM_TABLE
The following parameters correspond to each other (on the left the individual parameter - on the right the fields in the old interface structures ADRSWA_IN and ADRSWA_OUT):
ADDRESS_NUMBER - no equivalent
PERSON_NUMBER - no equivalent
SENDER_COUNTRY - ADRSWA_IN-INLND
RECEIVER_LANGUAGE - ADRSWA_IN-SPRAS
NUMBER_OF_LINES - ADRSWA_IN-ANZZL
STREET_HAS_PRIORITY - ADRSWA_IN-WAREN
LINE_PRIORITY - ADRSWA_IN-PRIOR
COUNTRY_NAME_IN_RECEIVER_LANGU - no equivalent
LANGUAGE_FOR_COUNTRY_NAME - no equivalent
NO_UPPER_CASE_FOR_CITY - no equivalent
ADDRESS_SHORT_FORM - ADRSWA_OUT-LINEK
ADDRESS_SHORT_FORM_S - no equivalent
ADDRESS_DATA_CARRIER - ADRSWA_OUT-LINED
ADDRESS_DATA_CARRIER_0 - ADRSWA_OUT-LINED0
NUMBER_OF_USED_LINES - ADRSWA_OUT-ANZZL
NAME_IS_EMPTY - no equivalent
ADDRESS_NOT_FOUND - no equivalent
ADDRESS_PRINTFORM_TABLE - no equivalent
The parameters are described in the parameter documentation. -
Is there a function to adjust the touch on the touch screen? Its been very sensitive lately
iphone has been very sensitive to my touch. Is there a setting or function to adust the touch on the touch screen?
Based upon your OP, I don't think Assistive Touch is what you want. For more info on AT, see p. 155 of the User Guide.
For your problem, try cleaning the screen and/or removing your screen protector. It's a long shot but quick and easy to do.
If still a problem, try restoring with your backup.
FYI, there is no adjustment for the touch screen sensitivity. -
Is there a way to keep the mouse pointer in my window
I would like to change the cursor so that it can not go outside my application window until they exit the program. Is this possible?
Just because you disagree with its usage does not make
it an invalid question. Suppose you had an
application dedicated to real-time monitoring of a
high-pressure system. In our hypothetical example,
accessing other parts of the system without first
properly "dismissing" the application could be
potentially hazardous - people could get hurt. In
this case, would it not make sense to make the
application "system-modal"? Furthermore, it would be
a convenience to the operator if the mouse pointer
were trapped in this critical application.
How would one go about trapping the mouse cursor
inside this application?Yes, it would make sense to make this application system-modal. And it would also make sense to not allow any other applications to run on the monitoring system. For such an application, then, it would occupy the entire screen and there would be no way to swap away from it to any other application. Which is what several people suggested for this rather non-critical application, I believe.
But in the ordinary case, where you are running on a system that does allow multiple applications to run, trapping the mouse cursor in a single application is bad manners and an alternate solution should be sought.
Maybe you are looking for
-
Can 9.2 HFM/Planning applications be migrated to 11.1.2
Hi, Can the HFM and Planning applications on 9.2 version be migrated into a newly installed 11.1.2 Hypeiron environment? The reason for not doing a in-place upgrade has been to do the clean install and optimize the intall and configurations.. Any hel
-
GOP / UEFI Vbios requests for MSI R9 270 Gaming
Hello. S/N: 602-V305-01SB1312001923 Can i have a BIOS file with UEFI / GOP for my graphics card?
-
I have a ipad2 but doesnt exist facetime icon. how can i install it?
i tried to reinstall ios few times but still no facetime icon. really wired and fed up with...
-
How does Oracle Business Intelligence aid in oil exploration workflows?
I am currently an Msc student of the University of Surrey in the United Kingdom and am working on my thesis involves the use of Oracle Business Intelligence platforms in establishing workflows and processes when creating a digital oilfield for the o
-
Multiple repositories for one OMS?
Can you use one Oracle Management Service with multiple backend repositories? Or does each respository require its own, dedicated OMS? In other words, is the OMS web application flexible so it can use two separate repository 11G databases? Or is it a