can some1 plz help me to draw a curved line

1 visualizzazione (ultimi 30 giorni)
I need to make a graph for school. I need to make just the second line http://www.geofex.com/Article_Folders/potsecrets/pottaper.gif (2.logarithmic or audio taper)
i already made a linear line.. this is my program
ps. i have no idea how this program works.. we didnt learn it in school
Un=120%tension[V]
R=500%potentiometer[kOhm]
I=10%potentiometer[mm]
x=0:1:10;%dunno what this line is
Rx=(x/I)*R
U=Un*(Rx/R)
plot(x,U)
xlabel('potentiometer[mm]')
ylabel('tension[V]')

Risposta accettata

mohammed
mohammed il 14 Gen 2014
Dear Masd
for Drawing a curved line u just need change your equation by square. i.e U=Un(Rx/R).^2;
Un=120%tension[V]
R=500%potentiometer[kOhm]
I=10%potentiometer[mm]
x=0:1:10;%dunno what this line is
Rx=(x/I)*R
U=Un*(Rx/R).^2;
plot(x,U)
xlabel('potentiometer[mm]')
ylabel('tension[V]')
x=0:1:10;%dunno what this line is;
This equation indicates that the value of x is changing from 0 to 10 at a step of 1;i.e [0,1,2,3.....,10].
i hope it will help you.
Best Of Luck.....
  2 Commenti
Masd
Masd il 14 Gen 2014
Modificato: Image Analyst il 15 Gen 2014
Thank you :)
Can you tell me what .^2 means?
Image Analyst
Image Analyst il 15 Gen 2014
It means to square every element of the array. So if you had a square matrix M, M^2 is like [M][M] which is a matrix multiply (first row times first column and sum, etc.) while M.^2 means the M(1,1) element is squared, the M(1,2) element is squared, and so on. Totally different result than the matrix multiply.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Mathematics in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by