Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!


  1. Jul 17, 2012 #1
    Hello friends,
    I am new to MATLAB and I have been asigned a task in MATLAB to simulate basic equation..
    I have no idea how to start..
    The equation is

    Arterial pressure= Mean arterial pressure - h*7.46 (h= height)

    Can you tell me how to do please?

  2. jcsd
  3. Jul 17, 2012 #2


    Staff: Mentor

    what are you trying to do? plot it?

    if so here's an example to try first:

    x = [ 1, 2, 3, 4, 5 ]
    y = a*x + b



  4. Jul 17, 2012 #3
    but how can i relate this to my equation?
    yes..I have to plot it ..H is variable and Arterial pressure is output
  5. Jul 17, 2012 #4


    Staff: Mentor

    so h is the independent variable just like the x in my example where I set
    x = [ 1, 2, 3, 4, 5]

    there is also a way to set x via a range:

    where x will vary from 1 to 5 by 0.1 increments ie x=[1.0, 1.1, 1.2, 1.3 ... 5]

    this should give you enough to solve the problem and plot your results via plot(h,ap)
  6. Jul 17, 2012 #5
    Thank you man ..now it is clear..

    I have one more question..

    I am trying to do same in simulink but can you tell me how to import my variable H in simulink? i mean which block shall I use?
  7. Jul 17, 2012 #6


    Staff: Mentor

    sorry I'm not a matlab user. I learned it once in a course on computational physics using java as an alternative to java simulations.

    Hopefully someone else will answer.

    In any event here's a link I found that may point you in the right direction:

  8. Jul 17, 2012 #7
    Thanks again
  9. Aug 10, 2012 #8
    Hi am new to MATLAB...I need to find the coordinates of a figure in a plot
    but i dont know how ...
    kindly explain
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Threads - MATLAB help Date
Matlab MATLab: Not enough inputs for nlinfit Nov 16, 2017
Matlab Help needed to fix a matlab code Nov 8, 2017
New to Matlab, help with vectors Feb 20, 2016
Need help with integral Dec 23, 2015
Communication between Arduino and Matlab Help Jun 19, 2015