How to plot the following function?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
5 Kommentare
Sam Chak
am 7 Okt. 2023
@Reema Noor, Refer to the provided example, then follow the code and plot some of the functions. Copy and paste the code by clicking the icon , then hit the 'Play' icon . If coded correctly, it should generate a plot.
Walter Roberson
am 7 Okt. 2023
Reminder:
Octave is a different product, not made by Mathworks.
The purpose of Octave, the reason it exists at all, is to force Mathworks to either go out of business or to force Mathworks to open-source everything about its software products.
The Free Software Foundation exists for explicitly political purposes -- to attempt to force an end to proprietary software.
It is thus inappropriate to ask for assistance with Octave here. If you want assistance with Octave, find another support resource.
Antworten (1)
Sam Chak
am 7 Okt. 2023
Hi @Reema Noor
You can find some good examples related to plotting some functions in these links:
2 Kommentare
Sam Chak
am 7 Okt. 2023
See also:
By the way, I remember that my math teacher taught that the logarithm function is defined only for positive real numbers. But the question tells you to plot from x = -10 to x = 12. Can you really take the logarithm of a negative number? Sure this is not a typo, like positive "+10"?
John D'Errico
am 7 Okt. 2023
Bearbeitet: John D'Errico
am 7 Okt. 2023
Not really true. The log function will return real results for positive real numbers. However, it is valid to extend that definition to the entire real line, and to the complex plane.
MATLAB can compute the log of negative numbers (the log will be imaginary), or of complex numbers. They will be complex in the latter case.
log(-1)
log(1+3i)
And those logs make sense in mathematics.
Siehe auch
Kategorien
Mehr zu Octave finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!