matlab三维画图问题。

4 views (last 30 days)
fayherp
fayherp on 22 May 2023
Answered: grdheng on 22 May 2023
现在我有一组数据x大小是8x10;P大小是8x10;load_inc为8;
用plot3(x,load_inc,P)画出来是这样的
请问有什么方法可以得到附录图片的效果图吗

Accepted Answer

grdheng
grdheng on 22 May 2023
你给的数据里面变量叫 pers, increm, error 与你代码说的 x, load_inc, P 没一个名字对的…请不要搞这种浪费别人时间去猜谁是谁的事情,你提问时请直接统一变量名。
无非就是把矩阵维度匹配上,适当转置而已。
close all;
subplot( 121 )
plot3( pers, kron( increm.', ones( 1, 10 ) ),  error )
subplot( 122 )
plot3( pers.', kron( ones( 10, 1 ), increm ),  error.' )

More Answers (0)

Community Treasure Hunt

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

Start Hunting!