Jump to content
  • Announcements

    • Rahul Ponginan

      Please click here for a short but important announcement   03/26/17

      Dear Users Our Commercial and Academic users around the world can use these same forums here as before i.e. the Altair Support Forum , Commercial users from India with solver queries can go to the Solver Forum for India Commercial Users , Academic Users from India and AOC India Participants are requested to go to the Forum for India Academic Users and AOC India Participants , We will be tending to all queries in all the forums promptly as before, thank you for your understanding. 


  • Content count

  • Joined

  • Last visited


  • Rank

Profile Information

  • Country
  • Are you University user?
  1. Plot

    Hi, Use the following code for the problem you have mentioned above. Thanks Sijo George %%------Code----------------- sigma_inf=100; a=10; theta=pi/2; r=[0:10:100]; for i = 1:length(r) sigma_rr(i) = (((sigma_inf/2)*(1-(a/r(i))^2))+(sigma_inf/2)*(1-4*(a/r(i))^2+3*(a/r(i))^4))*cos(2*theta); end for i = 1:length(r) sigma_theta(i) =(((sigma_inf/2)*(1+(a/r(i))^2))-(sigma_inf/2)*(1+3*(a/r(i))^4))*cos(2*theta); end plot(r,sigma_theta); xlabel('Radius(m)'); ylabel('Sigma_Theta')
  2. Plot

    It is because theta has only 16 elements. All variables must have equal number of elements. If you change the number of elements in theta, you must make the corresponding changes in 'r' also. Otherwise plotting and other operations will not take place. Thanks Sijo George
  3. Plot

    Hi Novak, The following code works for me. I made the following changes. 1) Used for loop 2) Removed sigma_theta from the last line. This is because plot3 command accepts only three inputs. 3) Used linspace command to include the radius range. Thanks Sijo George %%%%----Updated code sigma_inf=100; a=10; theta=[0:0.1:pi/2]; r = linspace(0,100,16); for i = 1:length(r) sigma_rr = (((sigma_inf/2)*(1-(a/r(i))^2))+(sigma_inf/2)*(1-4*(a/(i))^2+3*(a/r(i))^4))*cos(2*theta); end for i = 1:length(r) sigma_theta =(((sigma_inf/2)*(1+(a/r(i))^2))-(sigma_inf/2)*(1+3*(a/r(i))^4))*cos(2*theta); end plot3(theta,r,sigma_rr);
  4. Plot

    Hi Novak, I have made some changes in the code and it works fine for me. The 3-D plot is attached with this reply. The updated code is given below. The errors you made is also mentioned here. 1) Syntax theta=[0:0:pi/2]; is wrong 2) There is no need to mention @(theta) in Line no.5 and Line.no.6. 3) Use plot3 for obtaining 3-D plot. Thanks Sijo George %%-----Updated Code sigma_inf=100; a=10; r=10; theta=[0:0.1:pi/2]; sigma_rr = (((sigma_inf/2)*(1-(a/r)^2))+(sigma_inf/2)*(1-4*(a/r)^2+3*(a/r)^4))*cos(2*theta); sigma_theta =(((sigma_inf/2)*(1+(a/r)^2))-(sigma_inf/2)*(1+3*(a/r)^4))*cos(2*theta); plot3(theta,sigma_rr,sigma_theta);
  5. Edit plots compose

    Hi, 1) For now, there is no command to set the font size of the legend through the script. This facility will be introduced in the future release of Compose. 2) The second problem is solved in the coming release of Compose (2017.3 build) will be be delivered by the end of this October. Thank you
  6. SolidThinking Compose read files

    The following code gives a description of how to read data line by line in sT Compose. file = 'small_indian_train_data.csv'; fid = fopen(file,'rt'); counter = 0; % read file line by line while ~feof(fid) counter = counter + 1; line = fgetl(fid); sprintf('line %d in %s: %s',counter,file,line) end fclose(fid);