How to plot only the tensor diagonals?

5 views (last 30 days)
GTA
GTA on 20 May 2019
Edited: per isakson on 20 May 2019
Hello guys,
I'm trying to perform a subplot where my V variable is not plotting. Highlighting that both variables P (1,1, :) and V (1,1, :) are tensors. Except that when putting this format accuses error. So I chose P (1,1) and V (1,1), because I'm only wanting the diagonals of all the matrices of the iterations. Can someone help me? I am sending the code and the figure you are plotting, but my P variable is not plotting.
figure(8)
subplot(3,1,1)
plot(t,P(1,1),'r', t,V(1,1),'*b')
title({'Estimates of errors'},'FontSize',16,'FontName', 'Times New Roman')
legend('P', 'V');
subplot(3,1,2)
title({'Estimates of errors'},'FontSize',16,'FontName', 'Times New Roman')
plot(t,P(2,2),'r', t,V(2,2),'*b')
legend('P', 'V');
title({'Estimates of errors'},'FontSize',16,'FontName', 'Times New Roman')
subplot(3,1,3)
plot(t,P(3,3),'r', t,V(3,3),'*b')
legend('P', 'V');
title({'Estimates of errors'},'FontSize',16,'FontName', 'Times New Roman')

Answers (0)

Categories

Find more on Graphics Object Programming in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!