How can I fill the area between these lines and curves?

1 Ansicht (letzte 30 Tage)
Uyen
Uyen am 21 Mai 2023
Kommentiert: Image Analyst am 22 Mai 2023
x=0, x=4, y=sqrt(x), y=2
I have coded like this, but it fill the wrong area
x=0:0.01:4;
y=sqrt(x);
area(x,y)
How can I fill this area correctly?
  1 Kommentar
Image Analyst
Image Analyst am 21 Mai 2023
Your edit indicates you did not look at the FAQ and even try to adapt your code. Why not?

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Image Analyst
Image Analyst am 21 Mai 2023
  2 Kommentare
Uyen
Uyen am 21 Mai 2023
Verschoben: Image Analyst am 22 Mai 2023
It works, thank you so much.
Image Analyst
Image Analyst am 22 Mai 2023
Since this Answer solved your original question, then could you please click the "Accept this answer" link to award the answerer with "reputation points" for their efforts in helping you? They'd appreciate it. Thanks in advance. 🙂 Note: you can only accept one answer (so pick the best one) but you can click the "Vote" icon for as many Answers as you want. Voting for an answer will also award reputation points.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

the cyclist
the cyclist am 21 Mai 2023
You can use the fill function.

Kategorien

Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by