I was trying an example about using fsurf using a code from this tread ( Using Matlab to plot a cylinder bounded by a plane ).
The problem comes when I change the name of a declared syms variable the output of the graph changes completely, which I don´t really understand. Here is the output using the original code:
symObj = syms;
cellfun(@clear,symObj)
clear all
close all
syms r t u
fsurf(cos(r),sin(r),u*(cos(r)+2),[0,2*pi,0,1])
hold on
fsurf(r*cos(t),r*sin(t),r*cos(t)+2,[0,1,0,2*pi],'FaceColor','r')
rotate3d on
and here is the same example in which I only changed the name of the variable 't' to 'phi' in the declaration variable and the three places it was used in:
symObj = syms;
cellfun(@clear,symObj)
clear all
close all
syms r phi u
fsurf(cos(r),sin(r),u*(cos(r)+2),[0,2*pi,0,1])
hold on
fsurf(r*cos(phi),r*sin(phi),r*cos(phi)+2,[0,1,0,2*pi],'FaceColor','r')
rotate3d on

