Jump to content

Manoj Kandukuri

Members
  • Content count

    14
  • Joined

  • Last visited

About Manoj Kandukuri

  • Rank
    Beginner

Profile Information

  • Gender
    Female
  • Country
    United States
  • Interests
    Numerical Computing, Machine learning
  • Are you University user?
    No

Recent Profile Visitors

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

  1. While running the oml file in batch mode and : To set the working Directory same as where the file is located, one has to set the working directory in the .oml file itself, for example as below filepath = fileparts(omlfilename('fullpath')); % gets the directory path of the file cd(filepath) % sets the working directory or To set the working Directory as user specified directory, you can use gui tool box to specify the directory and set it as working directory for example cwd = input('Specify Path:','s'); % when prompted, enter the user specific path for example: C:\Users\vkandukuri\Documents cd(cwd) % sets the working directory as cwd variable a = 10; b =15; c = a+b; xlswrite('test.xlsx','c'); % creates xlsx file in specified cwd directory Thanks, Manoj kandukuri
  2. Manoj Kandukuri

    ReadVectorBuilder

    Liv, If you want to extract the element ID's, you can use "getreqlist" command. syntax: request_list = getreqlist(filename, datatype) request_list = getreqlist(filename, subcase, datatype) --> you will get a cell variable "request_list" with element ID's with a prefix letter 'E' like ( E1234, ....) and if you want to get the element id's in a matrix, you can do something like below : elementid = regexp(request_list,'E','split'); for i = 1:length(request_list) elem(i,:) = str2num(elementid{i}{1,2}); end Thanks, Manoj
  3. Manoj Kandukuri

    convhull function question

    Hi Seoksan Kim, As COMPOSE has a great feature of communicating between python environment and OML environment. we can utilize this feature to achieve the task when compose OML doesnt support any function. Scipy.spatial python library has ConvexHull function in it. we can use this to get the Convhull function in OML. You can install the Scipy python library as attached file I have attached the sample scripts that i created for the same. steps to run the scripts after installing scipy: 1. save the files in a folder 2. open test.oml in COMPOSE and set the working directory to the folder in step1. 3. Run test.oml You will get convhull points as variable k. Hope this helps. Please let me know if you have any questions. Convhull.py test.oml
  4. Manoj Kandukuri

    Overwriting .mat file

    Hi Berker, I couldnt able to reproduce it. if you see below, when i loaded new updated bb.mat, i could see the updated values. And also i could delete the bb.mat. are you overwriting the variables with same variable Type? ex: overwriting Strings with strings or Numbers with numbers? Thanks, Manoj
  5. Manoj Kandukuri

    Nested Functions

    Hi Berker, can you try sample 1 below. "end" statement for function "function [out1 outN]=bb(in1)" is at the last line of your sample script, causing the function "cc" "dd" "ee" not been evaluated in line 3. If you want to have functions "cc","dd","ee" to be nested inside the function"bb" then try sample 2 below. Hope this helps. sample 1. function [out1 outN]=bb(in1) in2=in1*3; out2=cc(in2); out1=out2; outN=ee(in1); end % end the function bb function out2=cc(in2) in3=in2*4; out3=dd(in3); out2=out3; function out3=dd(in3) out3=in3^2; end end function outN=ee(in1) outN=in1^3; end Sample2: function [out1 outN]=bb(in1) in2=in1*3; function out2=cc(in2) in3=in2*4; out3=dd(in3); out2=out3; function out3=dd(in3) out3=in3^2; end end function outN=ee(in1) outN=in1^3; end % evaluating function calls "cc" "ee" out2=cc(in2); out1=out2; outN=ee(in1); end Thanks, Manoj
  6. Manoj Kandukuri

    Adding new items to a structure

    adding email comment, Sorry for the inconvenience. what I observed was, if we do “clear all” its crashing but if I do “clear BSD “ its working fine. Do you want to clear all of the variables or is there a specific variable that you would like to clear from the work-space? Is there a specific reason you want to clear the work-space?
  7. Manoj Kandukuri

    Structure

    Adding ... . I just looked into it and you were right, the result would be different as the ‘for’ loop to create the BSD.Data variable would get overwritten with the latest data field. you can create a "tempdata" variable to set all your data points and then use Cell2struct command to fill in the "tempdata" with data fields as below. for i = 1:BSD.NumSims tempdata = {TEMP_DATA{1,i},TEMP_DATA{2,i},TEMP_DATA{3,i},TEMP_DATA{4,i}}; BSD.Data{i} = cell2struct(tempdata,{ 'Filename_Char','Filename_Input','Filename_MapOptions','Temperature_deg_C'}); end Can you please try the attached commands and let me know if you have any further questions. Btw, the original issue is fixed in the new version i.e. 2018.1, your original script is working fine in 2018.1 without any errors. Happy Coding!
  8. Manoj Kandukuri

    Register function to Hypergraph

    Hi Taiwen, Yes. Compose integration with HyperWorks was supported in version 2017.2 or above. FWIW: you can integrate Compose user defined Functions with Hypergraph, Hyperstudy, Hypermesh(Matrix Browser), Opitstruct via DRESP3. Thanks, Manoj kandukuri
  9. Manoj Kandukuri

    Structure

    Hi Berker, I see you want to create structure inside a cell variable BSD.Data? if so, you can simply do as below. Is this output as expected? for i = 1:BSD.NumSims BSD.Data{i} = struct('FilenameChar',TEMP_DATA{1,i}); %BSD.Data{i}.FilenameChar=TEMP_DATA{1,i}; end Output: > BSD.Data ans = { [1,1] struct [ FilenameChar: char1 } [2,1] struct [ FilenameChar: char2 } [3,1] struct [ FilenameChar: char3 } [4,1] struct [ FilenameChar: char4 } } thanks, Manoj Kandukuri
  10. Manoj Kandukuri

    Functions in Compose

    Hi Berker, Once you execute the function/script, function name will be stored in the memory space until you clear the memory associated with the function or you close & re- open a new instance and evaluate the function. When you edited the file and saved it, the function name is still in memory (from previous evaluation), so when evaluated its taking the previous statements. Please do "clear trail1" before evaluating the function for 2nd time. see below. [a,b,c,d] = trial1(6,12,20) a = 2 b = 5 c = 18 d = 3 > clear trial1 > [a,b,c,d] = trial1(6,12,20) a = 26 b = 240 c = 18 d = 0.230769231 thanks, Manoj
  11. Manoj Kandukuri

    Register function to Hypergraph

    Hi Taiwen, Can you please attach the info/picture of "updates and system information" from Hypergraph help? Hypergraph> Help> updates and system information Thanks, Manoj kandukuri
  12. Manoj Kandukuri

    Include compose functions

    Hi Matthieu, 1st we need to save the function script with the same name and use the function name in a different file. say for example script 1: save the test function as test.oml function out = test(a,b) out = a+b; end then, you can call the "test" in a different file as a script/function: function val = test2() a = 5 b =6 out = test(a,b) val = out; end hope this helps. Thanks, Manoj kandukuri
  13. Manoj Kandukuri

    Plotting in Compose

    Hi Berker, 1. Normalizing the resolution in set command should do the trick for making the dash lines more visible -- something like "set(gcf,'units','normalized','position',[.300 .300 0.600 .700]);" and you can change the linewidth in combination to make it more clearer. 2. The implementation of Text is little different, the text box starts from the X and Y coordinates, you can move the text box by adding or subtracting the X&Y arguments by a constant value in TEXT command. like text(point11(1)-0.8,point11(2)+0.2,'point11') text(point21(1)-0.85,point21(2)-0.2,'point21') text(point41(1)-1.25,point41(2)-0.1,'point41') text(point51(1)-1.15,point51(2)+0.25,'point51') text(point61(1)-0.8,point61(2),'point61') text(point71(1)-0.6,point71(2)+0.2,'point71') text(point81(1)-0.55,point81(2)-0.01,'point81') text(point91(1)-1.1,point91(2),'point91') Hope this helps. Thanks, Manoj
  14. Manoj Kandukuri

    Command to float figures

    Hi Berker, You can undock the plot window by setting the floating plot window in preferences File>Preferences>plot>Miscellaneous, see attached picture.
×