Show equation on the 3D Plot
3 次查看(过去 30 天)
显示 更早的评论
Greeting All
Can I get multiple regression equation in matlab code and show the equation on the 3D Plot.
I ihave three axeis X, Y , and Z.
Best regards
Samir
2 个评论
Walter Roberson
2020-8-16
text() can be passed x, y, and z coordinates to place text at.
But more common would be to create a character form of the equation and title() it.
采纳的回答
Prabhanjan Mentla
2020-8-18
Hi,
I assume the question needs two things one is getting the equation and then plotting on to the figure.
The below code can be added in the above link(after zlabel) to get figure title.
caption = sprintf('y = %f + %f * x1 + %f * x2 + %f * x1*x2', b(1),b(2),b(3),b(4));
text(15,185,45, caption, 'FontSize', 10, 'Color', 'r', 'FontWeight', 'bold');
You may get similar type of figure like below.
Hope this helps.
1 个评论
Mohammed Saifuddin Ustad
2023-5-26
编辑:Walter Roberson
2023-5-26
hey prabhanjan this is similar to a question i have
can you see if you can help?
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!