Drawing Rectangle/Lines with data
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Chris Dan
il 22 Gen 2020
Commentato: Fangjun Jiang
il 24 Gen 2020
Hello,
I have this matrix,
The first column is the base of the rectangle, starting from 0 till 0.15 and the second column is the magnitude of the height at both ends of the rectangle,
I am having trouble drawing it,, here is my code
x1 = 0;
x2 = 0.15;
y1 =[ 0.0120];
y2 = [0.0120];
figure
hold on
plot (x1,y1,'-');
plot(x2, y2,'-');
axis([0 0.5 0 0.1])
But, I am not getting correct results, I am getting nothing in the output.
Does any one know?
0 Commenti
Risposta accettata
Fangjun Jiang
il 22 Gen 2020
rectangle('Position',[0 0.15 0.012 0.012])
axis([0 0.02 0 0.2])
6 Commenti
Fangjun Jiang
il 24 Gen 2020
Just draw it with a pencil manually and match it with the MATLAB code. You've known rectangle(). I don't think there is any difficulty writing code here. It is more difficult to understand what you want to do.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Tables 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!