Getting Started with MATLAB Simulations of Basic Equations

  • Context: MATLAB 
  • Thread starter Thread starter mit_cool
  • Start date Start date
  • Tags Tags
    Matlab Simulations
Click For Summary

Discussion Overview

The discussion revolves around using MATLAB to simulate a basic equation related to arterial pressure and how to plot the results. Participants share their experiences and seek guidance on MATLAB and Simulink functionalities.

Discussion Character

  • Homework-related, Technical explanation

Main Points Raised

  • One participant expresses uncertainty about starting a MATLAB simulation for the equation relating arterial pressure to height.
  • Another participant provides a basic example of plotting in MATLAB, suggesting a linear relationship.
  • A follow-up question clarifies that height (h) is the independent variable and arterial pressure is the output to be plotted.
  • Further suggestions include setting a range for h similar to the example provided, indicating how to plot the results.
  • One participant inquires about importing the variable h into Simulink and requests advice on which block to use.
  • A participant mentions their lack of MATLAB experience, referencing an alternative computational tool and providing a link for additional resources.
  • Another participant seeks help with finding coordinates of a figure in a MATLAB plot, indicating a broader interest in MATLAB functionalities.

Areas of Agreement / Disagreement

The discussion includes multiple participants providing different levels of assistance, but there is no consensus on specific methods for using Simulink or finding plot coordinates, as these topics are raised separately.

Contextual Notes

Some participants may have varying levels of familiarity with MATLAB and Simulink, which could affect the clarity of the guidance provided. The discussion does not resolve the specifics of using Simulink or the method for finding plot coordinates.

Who May Find This Useful

Individuals new to MATLAB or those looking for assistance with basic simulations and plotting techniques may find this discussion helpful.

mit_cool
Messages
20
Reaction score
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?

thankx
 
Physics news on Phys.org
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)

...
 
but how can i relate this to my equation?
yes..I have to plot it ..H is variable and Arterial pressure is output
 
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)
 
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?
 
Thanks again
 
Hi am new to MATLAB...I need to find the coordinates of a figure in a plot
but i don't know how ...
kindly explain
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 0 ·
Replies
0
Views
348
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K