Nevermind...
I downloaded a trial version of MATLAB 2023b and tried running the sample OLED project on arduino uno. While a similar size project in Arduino IDE (Adafruit example) takes 31% of memory in Arduino Uno, the IO device created following this example in which all i did was pass 3 constants to X, Y and Z is taking 109% of total memory !!! I've read about MATLAB code adding too much overhead but this is beyond acceptable range.
I think i will just revert back to my original workflow of using MATLAB for simulation and doing all "production work" in Arduino IDE.