How to convert this equation to code?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I think it is x*sqrt((16-x**2)**3)) but it didnt wort
0 Kommentare
Antworten (3)
Chandrika
am 9 Jul. 2022
As per my understanding, you want the MATLAB code for the given expression. Please try using the following code for the same:
y=x*sqrt(cube((16-sqr(x))))
function square=sqr(x)
square=x*x;
end
function cuben=cube(x)
cuben=x*x*x;
end
You can check the above script by computing 'y' for different values of x.
Hope this helps!
0 Kommentare
Sam Chak
am 9 Jul. 2022
Hi Bruh, First, it's because you used the Python code. Second, bracket issue. Try this instead:
x.*sqrt((16 - x.^2).^3)
Siehe auch
Kategorien
Mehr zu Call Python from MATLAB 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!