Jump to content

Berker

Members
  • Content Count

    27
  • Joined

  • Last visited

About Berker

  • Rank
    Beginner

Profile Information

  • Country
    Canada
  • Are you University user?
    No

Recent Profile Visitors

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

  1. Thank you, Franck. Your guidance and suggestions helped a lot. We finally solved the problem. First, we installed Visual Studio 2015. But it did not work. I was getting the same error message. Then, we were able to fix the compiler issue by downloading it separately from the Visual Studio 2010 package. We still needed to install the Visual Studio 2010 package first. However, it didn't let us install the compiler due to .Net 4.0 issue. We had a newer .Net 4.x version. We installed the compiler afterwards. We downloaded the installation file from the link below: https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=4422 Thank you very much again for your help. Kind Regards Berker
  2. Hi Fanck, Thank you very much for taking the time to prepare this detailed response. I appreciate your help. I successfully upgraded pip, numpy and scipy. But the installation of pandas is still failing. The error that I receive is as follows: error: Microsoft Visual C++ 10.0 is required. Get it with "Microsoft Windows SDK 7.1": www.microsoft.com/download/details.aspx?id=8279 I have tried many things to resolve this issue. I installed Microsoft Windows SDK 7.1. I ran the same commands from Windows SDK 7.1 Command Prompt. But I am still getting the same error. I have many Microsoft Visual C++ versions on my computer. Attached you can see the list. I checked the online forums. Some mention set VS100COMNTOOLS=%VS140COMNTOOLS%, which I already applied. Some suggest having Visual C++ redistributable, which is already installed. Do you have any other suggestions to solve this issue? Thank you Berker Bilgin
  3. Hi Franck, Thank you very much for your response. I applied the steps that you suggested. In the command prompt, I typed the command set VS100COMNTOOLS=%VS120COMNTOOLS% It did not give me any error. Then, I switched to Python folder in the command prompt as you instructed. Please see the attached screenshot bb1. Then I executed the command "python.exe -m pip install pandas" in the command window. It tells me that I have an early version of pip (see the attached screenshot bb2). But it seems that the installation worked fine (see the attached screenshot bb3). However, after the installation is completed, when I run the command import pandas as pd in the Python Window in Compose, I still get the same error: ImportError: No module names 'pandas' I restarted Compose and then restarted the computer, but it didn't help. Do you have any suggestion for how I can find the reason of this issue? Thank you Berker
  4. Hello, I would like to follow up on this question. I am trying to install pandas module as well. I followed the instructions in the help file, but it is not working. Here are the things that I tried: I ran "python.exe" file located at C:\Program Files\Altair\2019\Compose2019\common\python\python3.4\win64 When I type "set VS100COMNTOOLS=%1 VS120COMNTOOLS%" on the command prompt, I get an error: "SyntaxError: invalid syntax" When I type "-m pip install pandas" on the command prompt, it again gives a syntax error. This command worked in Python terminal in PyCharm. I download the pandas module from its website. The name of the file I installed was "pandas-0.20.3-cp34-cp34m-win_amd64.whl" When I execute "-m pip install C:\Users\bilginb\Downloads\pandas-0.20.3-cp34-cp34m-win_amd64.whl" I still get a sytax error. Could you please help me with this issue? Thank you Berker
  5. Thank you, Jeff. I think made it work with the help of your guidance. Kind Regards Berker
  6. Hello, I am trying to create a class in Compose. Basically, I would like to replicate the attached "Circle_Class.m" file I created in MATLAB 2016. I implemented the attached "Circle_Class.oml" file. But I get errors when I execute the Circle_Class.oml. I couldn't find any information about classdef function in Compose help files. Could you please help me with this issue? Could you please also share some examples about how to creates a class in Compose? Thank you Berker Circle_Class.m Circle_Class.oml
  7. Hello, I am trying to call a function I wrote in a .py file by another .py file, but I am receiving an error. I created a simple example to better express the issue. In the SetFigureSizePos.py, there is a function definition called Figure_Size_Pos, which includes a simple if function. It returns a string. I want to call that function in another .py file in the same directory. That is what zzz.py file in the attachment does. In order to import the function into zzz.py, I use "from SetFigureSizePos import Figure_Size_Pos". When I run zzz.py I receive an error in the Python Window saying "ImportError: No Module named SetFigureSizePos" When I tried this approach directly in Python, it worked. Can you please help me with this issue? Thank you Berker SetFigureSizePos.py zzz.py
  8. Hello, I am using Compose 2019. I would like to use matplotlib in phyton to plot some figures. However, I need to plot them as undocked figures. Could this be possible? I created an example to better explain the issue. Attached you will find a .oml file and .py file. The oml file creates the variables and plots a simple figure. You will see commands which adjust the position of the figure on the screen. The oml file also exports the variables to python and calls .py file which plots the same figure in the Python window. I would like those two figures in the same position and size. Is that possible? Thank you Berker plot_test2_1.oml plot_test2_1.py
  9. Hi Manoj, Thank you for your response. I created another case to better explain how the issue happens. I also recorded a video to show it. You will find three .oml files. I use the same files in the video. I changed the array to be saved using zzz.oml. I have two other functions. The first one creates a folder to save the .mat file. The other one saves the variables in the workspace. You only need to run zzz.oml. After it is executed, please go to the folder where the .mat file is saved. Using "load" in the command window, please upload the variables saved in the .mat file to the workspace. Please change the variable a few times and see whether .mat file is updated. As you will see in the video, .mat file is not updated in my case. It works when I restart Compose. While this issues is happening and compose is running, I cannot delete the .mat file. I get a warning saying that Compose is using the file. Please let me know if you need more details. Thank you Berker overwrite.mov createFolder.oml saveResults.oml zzz.oml
  10. Hello, I am trying to overwrite a .mat file. I created a sample script to explain the issue. Please see it below. I create a .mat file called bb.mat with three variables. Then I load the file. I assign new values to the same variable and use the save function to overwrite bb.mat. I don't receive any error. But when I load the bb.mat file, it still has the old values. I also noticed that, I cannot delete the bb.mat file. I receive a warning saying that the file was used by Compose. Could you please let me know how I can overwrite a .mat file? clear all; close all; clc; A=10; B=20; C=30; save('bb.mat', '-v7.3'); clear all; close all; clc; load('bb.mat'); A=25; B=17; C=0; save('bb.mat', '-v7.3'); clear all; close all; clc; load('bb.mat'); Thank you Berker
  11. Hello, In the script below, I created a plot with a simple text on it. clear all; close all; clc; x=linspace(0,2*pi,200); y=sin(x); plot(x,y); hold on; plot(pi/2,1,'o'); text(pi/2,1,'P1'); The axis range of the figure is defined automatically. When I want to plot another function on the same figure, but with a larger axis range, the text that I created initially moves. Please apply the rest of the code below to see it: z=5*cos(x); plot(x,z,'-r'); plot(pi,-5,'o'); text(pi,-5,'peak'); What can I do to prevent the text from moving? Thank you Berker
  12. Hello, I am trying to annotate a figure in Compose, which requires special characters. Please see the sample code below. Are these special characters available in Compose? clear all; close all; clc; x=linspace(0,2*pi,200); y=sin(x); plot(x,y); text(pi,1,[num2str(15),'^{0}']); text(pi,-1,['\oslash',num2str(25)]); Thank you Berker
  13. Hello, I am trying to apply a script in Compose 2017.3, which eliminates some of the variables in the workspace when saving them as a .mat file. In order to test the issue, please load the variables in the attached .mat file in the workspace. When you load the attached .mat file, many variables will be available in the workspace. I would like to save these variables in another .mat file called 'berker4.mat', but I would like to eliminate 'savePath' and 'output_file' variables. In Matlab 2016a, I am using the following command: save('berker4.mat', '-regexp', '^(?!(savePath|output_file)$).', '-v7.3'); This command eliminates the variables I mentioned. When I use the same command in Compose 2017.3, 'berker4.mat' ends up empty. I noticed that 'regexp' is available in Compose. Should I parameterize the variables to be omitted in a different way? I appreciate if you can help me. Thank you Berker Bilgin berker3.mat
  14. Hello, I thought I need to provide more details regarding my question. Below please find a sample code I was running in Matlab 2016a. Here, I am using "integral2" to calculate the double integral. This function was not available in Compose 2017.3. I try to use "quad," but I am not sure whether that function calculated double layer integral. Is there another function that I can use to calculate double layer integral? clear all; close all; clc; rr1=0.0305; rr2=0.0415; xmin=0; xmax=0.005416836077132; f = @(x,y) x.^2 + y.^2; ymin = @(x) sqrt(rr1^2 - x.^2); ymax = @(x) sqrt(rr2^2 - x.^2); moment = 2*integral2(f, xmin, xmax, ymin, ymax); matlab_result=1.5624e-7; disp(moment); Thank you Berker
  15. Hello, I want to calculate numerical integration in Compose. I am using Compose 2017.3. In another script in Matlab 2016a, I was using integral2 function. I searched, but couldn't find this function in Compose. Is there another function available in Compose to calculate numerical integration? Thank you Berker
×
×
  • Create New...