Get the slope (gradient - derivative) of a curve at a point

hello
does anyone know if it is possible to get the slope (also might be known as gradient, derivative), of a curve at some point?
What i want to do, is draw a line that is vertical to a curve, so i need to have it's slope
thanx

The easiest way to do it would to be to get the point right before the point you're looking at and the point right after it and just find the slope between the two
If you try this method, make sure they are double values. Simple ints will not give you the slope you want.
I made a program once that animated a rocket flying through the air. The curve was found using a parametric equation (x and y in terms of time). To point the rocket, I had to find the dirivitive (a little bit of calc 1). Then, I just made a function that calculated the slope of the curve at any given time (t). It worked great, but it may not be what you're looking for. If you do need to find the dirivitive, post some code or the formula you are using, I'm sure there are people on this board that can help you.

Similar Messages

  • Evaluation of the slope of part of a curve with cursors

    Good morning,
    I am trying to get the slope of part of a curve. The curve is a stress strain curve and the idea is simply to manually choose the X range to evaluate the slope and extract the Young modulus. The user would place the cursors and the slope parameters would be displayed in an area.
    I got some clues from various examples here in presenting au automatized calculation of the min, max, average and other parameters of the part of the curve contained between the two cursors, using the StatblockCalc command in the adequate range.
    However, I understand that the regression tool needs two new channels containing the values between cursors (flags and export manually).
    Then, the doubt is: Is there some way to bypass the creation of new channels each time the cursor is moved to get the linear regression parameters "live"? I am rather new using scripts with diadem and can´t find the apropriate way to code this. Do you have any clue?
    Thank you in advance,
    David

    Hi David,
    See if this application does what you want.  Note that it installs a new icon at the top of the VIEW icon bar, so that you can call the script easily from the VIEW panel after you've run it once in the SCRIPT panel.  There is no way around extracting the new X and Y channels from the desired X range in order to calculate the slope of that X region, but you don't have to use flags, which are designed for interactive use only.
    http://forums.ni.com/t5/DIAdem/Using-DIAdem-how-to​-get-the-slope-of-a-signal-Linear-or-non/td-p/2158​...
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • Using DIAdem, how to get the slope of a signal (Linear or non-linear​)

    Rate of rise or rate of fall on a temperature signal, I'm trying to include the slope in my report using DIAdem,
    I couldn't find , Is there a slope function?
    or a way to do that
    Thanks
    Solved!
    Go to Solution.

    Hi amat,
    You can get the slope fit calculation from the built-in function "ANALYSIS >> Curve Fitting >> Calculate Regression".  If you want to fit only a subset of the data, you will need to extract that subset of data to a new data channel and then run the approximation calculation on the new channel.
    Here is a script I have created to do the range extraction and statistics/slope calculation automatically.
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments
    Attachments:
    Selected Region Stats.zip ‏5 KB

  • How can I calculate the slope of an isometric torque curve with a trigger and time increments of 0-30ms, 0-50ms, 0-100ms etc....

    I am analyzing isometric muscle contractions of the quadriceps and want to calculate the rate of force development (not just peak torque) for the torque-time curve.  I want to set a trigger so that the slope of the torque curve is calculated when 7 newton-meters is reached.  From there I'm trying to calculate the slope in time increments of 0-30ms, 0-50ms, 0-100ms, etc....My data is sampled at 2000 Hz and written in text files.  Below is a copy of the VI I have developed so far.  I am very new to programming with LabVIEW but can definitely see its potential!  Any advice would be greatly appreciated. 
    Attachments:
    Dissertation Isometric RFD.vi ‏14 KB

    Fiddler918,
    When trying to implement something like this in LabVIEW, it is often helpful to think about how you would program this function in a traditional text-based language.  Try and break the problem down.  You need to locate the data point in your array that is 7 Nm or greater.  At this point, you will need to grab the data points that are 60 indices (for the 30ms gap, assuming your points are equally spaced 0.5 ms apart), 100 indices (for the 50 ms gap), and 200 indices (for the 100ms gap) ahead of this point in your data file, and calculate the slope using pairs of data points.  
    Here is a general description of a possible implementation of this code:
    You can wire the appropriate column of the data array into a For Loop on the block diagram and have it auto index through the points.  If you right click on the Use the Greater or Equal? function to generate a Boolean that will be true when you want to exit the For Loop.  Right-click on the border of the For Loop and select Conditional Terminal.  This will cause a small stop sign to appear.  If you wire the Boolean to the conditional terminal, the loop will stop at the value that is greater than or equal to 7 Nm.  If you wire the Loop Iteration terminal out of the For Loop to the right, this will give you the index of the value in the column that you’re interested in.  Having this value, you can then use the Array functions to grab the specific data points you need, and numeric functions to perform the necessary math.
    If any of this didn't make sense, the LabVIEW help files are a great resource to use.
    Here is a link to some video tutorials of the LabVIEW programming environment.  They may help you in the development of your code.
    http://www.ni.com/academic/students/learnlabview/
    Regards,
    Jared R.
    Precision DC Product Support Engineer
    National Instruments

  • Why is it that every udate of my iPhone software do I get the error message on my laptop: AppleSyncNotifier.exe - Entry Point Not Found The procedure enrty point xmlTextReaderConstName could not be located in the dynamic link library libxml2.dll

    Each time I update the software on my iPhone4 I get the following error message on my lap top: AppleSyncNotifier.exe - Entry Point Not Found The procedure enrty point xmlTextReaderConstName could not be located in the dynamic link library libxml2.dll
    I go on line to find a solution, but it must be a common problem, why has apple not corrected yet?

    This is the fix I got from discussions and it worked for me.  It is copied below.  I just did the manual fix which I have underlined. Good luck! Regards, Belle.
    This can occur because libmxl2.dll is not in your C:\Program Files\Common Files\Apple\Mobile Device Support folder.
    There have been some issues with this and other dlls not being in the right place (or not being everywhere they should be) since the 10.3.1.55 iTunes update.
    However, I note that the 10.4 iTunes update is now out - surprisingly quickly - so try installing that, rebooting, and see if your issue is solved.
    If it isn't, though, here's the manual fix:-
    With Windows Explorer, navigate to your C:\Program Files\Common Files\Apple\Apple Application Support folder.
    Copy the libmxl2.dll that you should find there, navigate to the nearby Mobile Device Support folder, and Paste it in there also.
    Reboot and see if all is well.
    I actually had the issue with SQLite3.dll, and the above fix worked for me (I found it in an April 2010 posting!).
    I passed on the fix as above for the similar issue with libmxl2.dll to someone who had exactly your problem, and he reported that it fixed it for him.

  • How do I get the photos out of my Blackberry curve 8520 into my Photobucke​t album?

    I never got a USB cable with my Balckberry when I got it from Virgin but I have since bought one. They would not send me one because I have had it for over a year. I need to get my photos out of it cos it's going back to them after my first 2-year contract is up.

    Well, I hooked it up to my laptop and new hardware was detected. It ran through several things - including mass storage - and said my Blackberry was installed and ready for use.
    There was a message on my Blackberry asking if I wanted to activate mass storage but it said I may lose some media files or something if I did so I clicked on "No".
    I then went to Start and My Computer but there was no sign of my Blackberry!
    I also looked in All Programmes but there was nothing new on the list.
    I'm a bit of a dork about technology - as you will have gathered - but I'd really appreciate more help. I'm keen to learn, at least!

  • When I go into More 4 Catch up TV I do not get the bar that allows you to pause, enlarge, scoll forward when I click onto a programme is this Firefow or More 4? Can you help me fix?

    When I go into Channel 4 website to catch up on tv programmes on any of their channels I do not get the task bar to be able to pause, select point in programme to start from etc. Happens in both play and play in pop up. So if I play I can not make large screen.
    Don't know where problem lies but others in house who acces same web site do not have this problem and I am the only one that uses firefox.
    We all have different computers

    That file might have moved to a different location on the server. I think you'll need to check with RefWorks support or your local IT department on why the install page links do not work.

  • Getting the number of active connections in a connection Pool

    Hi,
    I have an application deployed on jboss. DB used is db2. For monitoring purpose i need to get the number of active and idle connections at any point of time. I am trying to use commons-dbcp jar to get this data using BasicDataSourceClass. Following is the piece of code.
    Context initialContext;
    try {
         initialContext = new InitialContext();
         DataSource ds = (DataSource) initialContext.lookup(myjndiname);
         logger.info("************CONNECTION POOL DATA->" + ds.getClass().getName() + "************" + ds.getClass() + "**************");
         BasicDataSource bds = (BasicDataSource) datasource;
              logger.info("************CONNECTION POOL DATA-> ACTIVE CONN=" + bds.getNumActive() + " IDLE CONN=" + bds.getNumIdle() + " INIT SIZE=" + bds.getInitialSize());
    catch (NamingException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
    This code gave a class cast exception at the point datasource is cast to BasicDataSource. The class name returned by ds is WrapperDataSource. I have few queries on this:-
    1. What configurations do i need so that datasource returned by InitialContext is BasicDataSource? FYI i tried to add the BasicDataSourceFactory in db2-ds.xml. But it still didnt work
    2. Is there any other way to find the number of active connections in a connection pool? I dont want any server specific solution.
    Pls help.
    Thanks

    user13642196 wrote:
    Hi,
    I have an application deployed on jboss. DB used is db2. For monitoring purpose i need to get the number of active and idle connections at any point of time. I am trying to use commons-dbcp jar to get this data using BasicDataSourceClass. Following is the piece of code.
    Context initialContext;
    try {
                 initialContext = new InitialContext();
                 DataSource ds = (DataSource) initialContext.lookup(myjndiname);
                 logger.info("************CONNECTION POOL DATA->" + ds.getClass().getName() + "************" + ds.getClass() + "**************");
                 BasicDataSource bds = (BasicDataSource) datasource;
              logger.info("************CONNECTION POOL DATA-> ACTIVE CONN=" + bds.getNumActive() + "  IDLE CONN=" + bds.getNumIdle() + "   INIT SIZE=" + bds.getInitialSize());
    catch (NamingException e) {
                 // TODO Auto-generated catch block
                 e.printStackTrace();
    }This code gave a class cast exception at the point datasource is cast to BasicDataSource. The class name returned by ds is WrapperDataSource. You can only cast an object to an interface it implements or to a class it extends (directly or indirectly).
    I have few queries on this:-
    1. What configurations do i need so that datasource returned by InitialContext is BasicDataSource? FYI i tried to add the BasicDataSourceFactory in db2-ds.xml. But it still didnt workhttp://commons.apache.org/dbcp/api-1.2.2/org/apache/commons/dbcp/package-summary.html#package_description

  • Getting the best possible DVD encodes out of Compressor

    Is there a decent guide somewhere about how best to set Compressor DVD encode projects up? I take it using the standard two-pass encode settings probably isn't ideal and some tweaks would possible yield better results.
    I just read this on another site - Can somebody explain what this is all about?
    +The program I used is a Windows software encoder that costs a lot less money than you'd think. I manually operated it (that is, told it which frame was to be an I frame, a P frame, or on rarer occasions, a B frame) by hand rather than letting it assign automatically.+
    +Tweaking the GOP structure like this is essential for getting the most out of it, and beyond a certain point actually has more of an effect on the picture quality than bit-rate.+

    Is there a decent guide somewhere about how best to set Compressor DVD encode projects up? I
    take it using the standard two-pass encode settings probably isn't ideal and some tweaks would
    possible yield better results.
    If you're serious about this, you should also invest in a book dedicated to video encoding. Just look on amazon.com for the latest editions byt the tow or three main authors, search for "encoding" and "video encoding."
    The process of getting the best possible image out of MPEG2 is tedious, more like accounting than moviemaking. The best software allows you to carefully preview the results, compare them, and is likely to be supported by a realtime encoding card. And that means it's a very expensive PC application.
    At NAB2008 a new product was announced for Compressor that was supposed to provide near real time professional grade MPEG2 encoding. Cant' recall the name. It was about $3k IIRC.
    bogiesan

  • How do i get the Ok prompt on Sun E250 from a windows keyboard

    I have tried the F5 and ctrl+alt+pause options to get the ok prompt without any success and at what point do I invoke the stop? What key combination from a windows key board would achieve the STOP effect like a sun keyboard.
    I would like to solve this problem /var/adm/utmpx not owned by root or not mode 644 error?, how do i solve it ? Help me out guys. Am very much a newbie with all this.
    NB am working from a hyperterminal seession.

    I assume you mean that you are using a serial line console. If this is set up in the default way, then sending an RS-232 BREAK sequence should drop you to the boot prompt. I've no idea how to do this from Hyperterminal, but there should be an option to do it in one of the menus somewhere. Alternatively, physically disconnecting then reconnecting the serial line is often interpreted as a BREAK.

  • Is it possible to get the BlackBerry Curve to be a reliable MODEM?

    My BlackBerry has been a constant source of frustration since it is worthless as a data device, it frequently drops connections and often will not reconnect again.  The phone provider just runs through a standard set of clearing cache, removing battery, etc. types of circumventions that may get the connection back but it fails soon after.  It is pointless to have a device that needs to have the battery removed multiple times every day, and that ends up being an unreliable MODEM for connecting to the internet.  Talking to the phone service provider is of little help since they are a middle man for RIM whom seems to provide them with no real means of resolving problems, and RIM seems to have isolated themselves from the customer base so that they have no idea about how the customer experience with their product.  The problem is encountered from both a Windows Media Center (WIN/XP) desktop and a Windows Vista Laptop, using my sons NOKIA E51 works without any problems and even provides faster connections in the process.  It seems that this is a problem with the BlackBerry product, but I have not been able to find any support that can resolve the issues.
    ANY IDEAS ON HOW TO GET THE BLACKBERRY CURVE TO BE RELIABLE?
    Message Edited by pdh1948 on 07-12-2008 02:40 AM

    I would recommend that you update the handheld operating system. You can see a list of latest versions available HERE. If your problems persist then you need to get a replacement device from the carrier.

  • Finding the slope of a tangent to a curve

    Hello everyone,
    I would appreciate guidance to any specific built-in subVI or routine which I can use to draw a tangent to a curve and find its slope. Specifically, I will need to to able to draw this tangent at any user specifed y-value. In order to keep it very accurate, I will not like to use any arbitrary cursors. The curve itself is drawn from a text file data which is read and passed onto an xy-graph.
    Any guidance will be much appreciated.
    cheers,
    Navneet
    Solved!
    Go to Solution.

    Not really Mathan, going through it still.
    For argument sake, lets assume an exponential increasing function and i want to find the slope at the point where y = 0. what will be the most optimum approach for this?
    Thanks for your reply, kindly appreciated.

  • Getting the New software 6.0 For blackberry curve

    I would like to get the new software for my curve but i dont know how to. i havent gotten an update and i keep checking. is there any way to put it on by going to a verizon store or off the website?

    Hi,
    To update your Blackberry Operating System (OS) software, follow the instructions I will provide.  You can check which version your device is running by going to Options>About on your device.  Here are the instructions:
    How to Update your Blackberry’s Software
    1. On your computer, download and install Blackberry Desktop Manager (BDM). The program can be found on the CD that came with your Blackberry or from Blackberry’s web site at the following URL: http://na.blackberry.com/eng/services/desktop/  
    2. Download the upgrade file for your device. This can be done from the vendor’s web site, such as Verizon’s at http://vzw.smithmicro.com/blackberry/  
    3. Click on the downloaded upgrade file and install that file your computer. Now the upgrade file will be integrated into BDM.
    4. Attach your Blackberry device to your computer and backup your device’s settings before upgrading. This is important so that you do not have to enter your contacts, etc back into your phone again.
    5. After backing up, you are ready to begin. With BDM running on your computer, click on Application Loader.
    6. Under Update Software, click on Start.
    7. Now you will be presented with a list of available software upgrade options. Select the proper upgrade by placing a check mark next to the one you want to install and click next.
    8. Follow the prompts and your software will install on your device. It is important to remember that the whole process can take 30-45 minutes. Do not unplug your Blackberry from your computer during the upgrade.
    9. Once you receive the message on your computer the process is complete, you are done.
    Hope this helps,
    Doc

  • How do I get the french curve tool to stop snapping in touch mode

    How do I get the french curve tool to stop snapping in touch mode

    lkinne,
    Just to make sure, which snappings (& Smart Guides and Align to Pixel Grid) have you set to be active?

  • How can i get the timestamp of first data at continue sample mode?

    how can i get the timestamp of first data at  continue sample mode?
    6023e pci , and c++ code
    thanks !

    The tangent ist the derivative of the curve in that point. You can try to use a numerical derivative vi or keep it simple an approximate with a line through the adjacent points.
    Gabi
    7.1 -- 2013
    CLA

Maybe you are looking for

  • Help! 24" iMac screen turns solid colors, freezes

    Hello everyone, I have a 3.06 GHz, 4 GB, iMac running 10.6.1. and I have a weird problem: while I was running Windows 7 under Boot Camp, during a simple task, my screen suddenly turned a solid shade of gray. Having no other option, I held the power b

  • IOS 4.3 performance

    I really have not seen much publicized about this but ever since I applied the 4.3 update to both my iPad and iPhone performance has taken a big hit. I can watch as I type several words and then watch them show up with a significant delay, my iPad us

  • Cfe01 export DIR to cFolders long run no message and multiple(100) versions

    Dear all, Greeting for the Day ! ! I have one weird issue.. when i export DMS DIR to cFolders using Tcode cfe01, the process never ends and processing bar of SAP GUI appears for long time than i have to kill it using stop transaction. After that when

  • Urgent help req

    Purchased MacAir book a month ago. On holiday remote location. Can't log in, don't think logged out correctly. Spining coloured wheel been going round for hours.

  • Prices for sales order

    hi all I want to create different prices for different sales order under same contract.  The service materials is the same. Does the system allow me to link price to a particular sales order instead of a contract. Advice me. cheers shalsa007........