Jump to content

Manoj Kandukuri

  • Content Count

  • Joined

  • Last visited

  • Days Won


Manoj Kandukuri last won the day on June 3

Manoj Kandukuri had the most liked content!

About Manoj Kandukuri

  • Rank
    Advanced Member

Profile Information

  • Gender
  • Interests
    Numerical Computing, Machine learning
  • Are you University user?

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. There are multiple commands to extract CAE/Test data file in Compose OML. of which, readmultvectors, readcae commands extracts results of specific input arguments given by the user. I had multiple requests from users asking, as these 2 functions serve the same purpose then whats the difference between readmultvector & readcae? Which one do we use and when? As an engineer myself, I tried to break it down based on 2 key factors below: 1. Syntax differences (Ease of Use) 2. Speed/Performance Attached is the paper i wrote about the same with example. Hope this helps users to pick the right command for their tasks. Happy coding!! Thanks, Manoj kandukuri readmultvector_readcae_why_are_they_2.pdf
  2. Hi Debdatta, You can use "real" & "angle" commands to get magnitude and phase of fft signal real(ft) angle(ft) thanks, Manoj kandukuri
  3. Hi Batuhancoskun, As your variable 'str' is a string, you can get desired output by using indexing to get the "letters" form the string --> str(6:end) output: ForGeeks if you want to split a string at a desired character/delimiter you can use 'strplit', 'regexp' functions. Hope this helps
  4. Below is kind of a hack in 2019.2 1. set python as preferred language under file>preferences>Compose>General 2. open new python and OML files (to trigger OML command window) 3. close compose and relaunch you will see both OML and python interpreters.
  5. Hi Nils, you can use "set(gca,'xtick',7)" where 7 is number of ticks you want to have between the limits [0:t_sim]. hope this helps thanks, Manoj kandukuri
  6. Do you see 'fid' variable has a negative value ? if so, you might not have the 'nodes.txt' in the current working directory. can you please make sure you have the file in current working directory, if not change the working directory or have the fullpath to the file. like: fid =fopen('C:/temp/test.txt', 'r') thanks, Manoj kandukuri
  7. Hi Dung, you can get more accurate result by having a tolerance condition inside a while loop. something like below: %% clc, clear sum = 0; sum_before = realmax; tol = 1e-12; % tolerance value i = 0; while (abs(sum_before - sum) >= tol) i= i+ 1; sum_before = sum; sum = sum + 1/(i^2); end %% Hope this helps Thanks, Manoj kandukuri
  8. Please add the below lines on top in your zzz.py and it will do the trick. sys.path.append sets the path to import the files from the current folder. import sys sys.path.append('C:/Users/vkandukuri/Downloads') #change the path to the path where you have the files Thanks, Manoj kandukuri
  9. Hi Berker, As Python doesn't uses the plotting framework of OML, you can undock/dock the figure in python by using run_line_magic ipython api's set the positions and sizes. add below lines in your script to create pop up figure window from Python from IPython import get_ipython get_ipython().run_line_magic('matplotlib', 'qt') And to size the figure window you can use "matplotlib.rcParams['figure.figsize'] = (h, b)" where h and b are widow size. Note: get_ipython().run_line_magic('matplotlib', 'qt') undocks the figure window and get_ipython().run_line_magic('matplotlib', 'inline') docks the figure in command window. I have edited your python script as attached. hope this helps. If you want to have the plots inside OML only, then you can transfer the data from python back to Compose OML (by using getpythonvar command) and then plot inside OML. Did you try transferring of data back to OML from python and then do plotting inside OML? Thanks, Manoj kandukuri plot_test2_2.py
  10. Roberta, i just tried your suggestion, it didnt work. compose interpreted it as a string... Manoj kandukuri
  11. Hi Seoksan, you can save the plot to a variable and then set linewidth property for this variable.. clf; x = linspace(0,10,150); y = cos(5*x); h = plot(x,y,'b--o','linewidth',0.1); title('2-D Line Plot'); xlabel('x'); ylabel('cos(5x)') set(h, 'linewidth', 4) Manoj Kandukuri
  12. Thanks for your reply Jeff. I wanted to profile the functions used in oml scripts and their execution times in a report to improve the performance of the code. MK
  13. Is there a way to get list of functions (both inbuilt and user defined) used in .oml scripts? Thanks, MK
  14. Seoksan, I'm not sure why it didn't work but when i searched online, i found this is due to possible bug in axis('equal') - equal scaling by changing the limits when clf is refreshed, this causing the ylim changes to fade out. ( see https://github.com/matplotlib/matplotlib/issues/8093) Thanks, Manoj kandukuri
  • Create New...