Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

Patch command works in R2015b but gives error with same arguments in 2016a

1 view (last 30 days)
Hi All, I am trying to plot the temperature distribution in a rectangular cross-section of slab subjected to fire. I have the nodal co-ordinates of all the elements of the cross-section as well as temperature at each nodes. When I plot this distribution using patch command in a loop in Matlab R2015b it works completely fine and gives great result. However, the same set of statemens and command when I execute in Matlab R2016a, it gives me an error. The command I use in a loop are: for e=1:nel XX = [X2(e,1) X2(e,2) X2(e,3) X2(e,4) X2(e,5)]; YY = [Y2(e,1) Y2(e,2) Y2(e,3) Y2(e,4) Y2(e,5)]; TT = [T2(e,1) T2(e,2) T2(e,3) T2(e,4) T2(e,5)]; patch(XX,YY,TT); hold on; end where, nel = number of elements X2 is a nel x 5, array with X-coordinates of the nodes of an element Y is a nel x 5, array with Y-coordinates of the nodes of an element T2 is a nel x 5, array with temperatures of the nodes of an element There are five columns in X2, Y2 and T2 is to complete polygon (rectangle) for patch command i.e., X2(e,5) = X2(e,1); Y2(e,5) =Y2(e,1); and T2(e,5) = T2(e,1) I tried to look for this issue but couldn't find any guidance. Any help would be appreciated

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!