New Reply

MATLAB help

 
Share Thread
Jul17-12, 03:04 PM   #1
 

MATLAB help


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?

thankx
PhysOrg.com science news on PhysOrg.com

>> City-life changes blackbird personalities, study shows
>> Origins of 'The Hoff' crab revealed (w/ Video)
>> Older males make better fathers: Mature male beetles work harder, care less about female infidelity
Jul17-12, 03:38 PM   #2
 
what are you trying to do? plot it?

if so here's an example to try first:

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

plot(x,y)

y2=x*x
plot(x,y2)

...
Jul17-12, 03:55 PM   #3
 
but how can i relate this to my equation?
yes..I have to plot it ..H is variable and Arterial pressure is output
Jul17-12, 04:02 PM   #4
 

MATLAB help


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:
x=1:5:0.1

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)
Jul17-12, 04:07 PM   #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?
Jul17-12, 04:13 PM   #6
 
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:

http://www.mathworks.com/support/tec...1900/1902.html
Jul17-12, 04:14 PM   #7
 
Thanks again
Aug10-12, 01:05 AM   #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
New Reply

Similar discussions for: MATLAB help
Thread Forum Replies
MATLAB: sparse matrices in matlab anamoly? Math & Science Software 0
Matlab R2011a's new feature: "portable C/C++ code directly from MATLAB" Math & Science Software 1
MATLAB: Trying to understand a MATLAB .m file Math & Science Software 0
Matlab: How to apply filters to and ECG signal using matlab? Math & Science Software 2