MaplePrimes - Questions and Posts tagged with import
http://www.mapleprimes.com/tags/import
en-us2017 Maplesoft, A Division of Waterloo Maple Inc.Maplesoft Document SystemMon, 27 Mar 2017 20:29:27 GMTMon, 27 Mar 2017 20:29:27 GMTThe most recent questions and posts on MaplePrimes tagged with importhttp://www.mapleprimes.com/images/mapleprimeswhite.jpgMaplePrimes - Questions and Posts tagged with import
http://www.mapleprimes.com/tags/import
Plot3d for data imported from an excel file
http://www.mapleprimes.com/questions/221489-Plot3d-For-Data-Imported-From-An-Excel-File?ref=Feed:MaplePrimes:Tagged With import
<p>Dear All,</p>
<p>The excel file consists of data (v2, Re, t) and I would like plot the variable "t" aginst the variables "v2" and "Re". Could anyone point me out?</p>
<p>Attached is the excel data.<a href="/view.aspx?sf=221489_question/Collapsetime.xlsx">Collapsetime.xlsx</a> </p>
<p>Thank you.</p>
<p>Very kind wishes,</p>
<p>Wang Zhe</p>
<p>Dear All,</p>
<p>The excel file consists of data (v2, Re, t) and I would like plot the variable "t" aginst the variables "v2" and "Re". Could anyone point me out?</p>
<p>Attached is the excel data.<a href="/view.aspx?sf=221489_question/Collapsetime.xlsx">Collapsetime.xlsx</a> </p>
<p>Thank you.</p>
<p>Very kind wishes,</p>
<p>Wang Zhe</p>
221489Sun, 19 Mar 2017 09:12:14 ZZWangZWangHow can I import the Modelica library from the Modelica Association into MapleSim?
http://www.mapleprimes.com/questions/221210-How-Can-I-Import-The-Modelica-Library?ref=Feed:MaplePrimes:Tagged With import
<p>I have tried to do it by the following command "File/Modelica/Import Modelica Library" in MapleSim GUI. An error appears saying "Modelica is a reserved name".</p>
<p>I think you can also reproduce it by downloading the Modelica library from the following web site: "https://www.modelica.org/libraries". And then importing it in the usual way by openning the package.mo file at the root directory.</p>
<p>I think I am missing something here, so any advise/information/minimal commentary would be greatly appreciated.</p>
<p>Cheers, Ovle</p>
<p>I have tried to do it by the following command "File/Modelica/Import Modelica Library" in MapleSim GUI. An error appears saying "Modelica is a reserved name".</p>
<p>I think you can also reproduce it by downloading the Modelica library from the following web site: "https://www.modelica.org/libraries". And then importing it in the usual way by openning the package.mo file at the root directory.</p>
<p>I think I am missing something here, so any advise/information/minimal commentary would be greatly appreciated.</p>
<p>Cheers, Ovle</p>
221210Thu, 16 Feb 2017 14:49:45 ZOvleOvleIs it possible to import questions from Maple TA into Maple?
http://www.mapleprimes.com/questions/221084-Is-It-Possible-To-Import-Questions-From?ref=Feed:MaplePrimes:Tagged With import
<p>Hi, I'd like to know if is it possible to import questions from Maple TA into Maple and use them in quizes, for example. Your help will be highly appreciated. Thank you.</p>
<p>Hi, I'd like to know if is it possible to import questions from Maple TA into Maple and use them in quizes, for example. Your help will be highly appreciated. Thank you.</p>
221084Mon, 06 Feb 2017 11:57:46 ZmathstutormathstutorAre NetCdf files supported by Maple ?
http://www.mapleprimes.com/questions/220226-Are-NetCdf-Files-Supported-By-Maple-?ref=Feed:MaplePrimes:Tagged With import
<p>Hello all, </p>
<p>A question concerning NetCdf files was asked in 2012 and is still unanswered today.<br>
Browsing the questions only returns this item, suggesting the NetCdf topic is not a concern in the Maple community.<br>
Nevertheless, does it exist some capabilities in reading and writting NetCDF files ?<br>
If not, are there some planned development on the subject ?<br>
<br>
Let's hope now for not having to wait four years for an answer, all responses will be greatly appreciated, even negative.</p>
<p>years</p>
<p><br>
PS : NetCdf capabilities already exist in Sage or Mathematica</p>
<p>Hello all, </p>
<p>A question concerning NetCdf files was asked in 2012 and is still unanswered today.<br />
Browsing the questions only returns this item, suggesting the NetCdf topic is not a concern in the Maple community.<br />
Nevertheless, does it exist some capabilities in reading and writting NetCDF files ?<br />
If not, are there some planned development on the subject ?<br />
<br />
Let's hope now for not having to wait four years for an answer, all responses will be greatly appreciated, even negative.</p>
<p>years</p>
<p><br />
PS : NetCdf capabilities already exist in Sage or Mathematica</p>
220226Mon, 28 Nov 2016 18:03:35 ZmmcdarammcdaraWorkbook issues
http://www.mapleprimes.com/questions/216709-Workbook-Issues?ref=Feed:MaplePrimes:Tagged With import
<p>Dear Maple users</p>
<p>I have done some experiments with the new Workbook feature in Maple 2016. It is a very welcome addition, indeed. Earlier I have created Maple files in which data from an external Excel file was imported and being used for certain calculations. In order to make recalculations work properly, one need to let the Excel file follow the Maple file. That's where a Workbook come in handy! I tried placing those two files in a Workbook. It didn't work completely as advertised, I think. I moved the Workbook to another location on the harddrive to make sure it wouldn't interfere with the original files outside the Workbook. Then I recalculated the Maple document inside the Workbook. The good thing: The data from the Excel file was still present. The bad thing: If I changed some data in the Excel file inside the Workbook, it didn't register in the Maple file when updating it! </p>
<p>Maybe I should explain that I did import data from the Excel file into Maple via the menu: Tools > Assistants > Import Data... The data was retrieved as a matrix within the Maple file and assigned to a variable and used for plots ...</p>
<p>Why doesn't the above procedure work properly? I hope one don't need to use the Workbook URI to reference files within the workbook. It is not that userfriendly!</p>
<p> </p>
<p>Regards,</p>
<p>Erik</p><p>Dear Maple users</p>
<p>I have done some experiments with the new Workbook feature in Maple 2016. It is a very welcome addition, indeed. Earlier I have created Maple files in which data from an external Excel file was imported and being used for certain calculations. In order to make recalculations work properly, one need to let the Excel file follow the Maple file. That's where a Workbook come in handy! I tried placing those two files in a Workbook. It didn't work completely as advertised, I think. I moved the Workbook to another location on the harddrive to make sure it wouldn't interfere with the original files outside the Workbook. Then I recalculated the Maple document inside the Workbook. The good thing: The data from the Excel file was still present. The bad thing: If I changed some data in the Excel file inside the Workbook, it didn't register in the Maple file when updating it! </p>
<p>Maybe I should explain that I did import data from the Excel file into Maple via the menu: Tools > Assistants > Import Data... The data was retrieved as a matrix within the Maple file and assigned to a variable and used for plots ...</p>
<p>Why doesn't the above procedure work properly? I hope one don't need to use the Workbook URI to reference files within the workbook. It is not that userfriendly!</p>
<p> </p>
<p>Regards,</p>
<p>Erik</p>216709Mon, 29 Aug 2016 19:41:02 Zerik10erik10From Python into Maple
http://www.mapleprimes.com/questions/213420-From-Python--Into-Maple?ref=Feed:MaplePrimes:Tagged With import
<p>how to translate python code which use scipy, numpy to maple code</p>
<p> </p>
<p> </p>
<pre>import numpy as np
from scipy.sparse.linalg import svds
from functools import partial
def emsvd(Y, k=None, tol=1E-3, maxiter=None):
"""
Approximate SVD on data with missing values via expectation-maximization
Inputs:
-----------
Y: (nobs, ndim) data matrix, missing values denoted by NaN/Inf
k: number of singular values/vectors to find (default: k=ndim)
tol: convergence tolerance on change in trace norm
maxiter: maximum number of EM steps to perform (default: no limit)
Returns:
-----------
Y_hat: (nobs, ndim) reconstructed data matrix
mu_hat: (ndim,) estimated column means for reconstructed data
U, s, Vt: singular values and vectors (see np.linalg.svd and
scipy.sparse.linalg.svds for details)
"""
if k is None:
svdmethod = partial(np.linalg.svd, full_matrices=False)
else:
svdmethod = partial(svds, k=k)
if maxiter is None:
maxiter = np.inf
# initialize the missing values to their respective column means
mu_hat = np.nanmean(Y, axis=0, keepdims=1)
valid = np.isfinite(Y)
Y_hat = np.where(valid, Y, mu_hat)
halt = False
ii = 1
v_prev = 0
while not halt:
# SVD on filled-in data
U, s, Vt = svdmethod(Y_hat - mu_hat)
# impute missing values
Y_hat[~valid] = (U.dot(np.diag(s)).dot(Vt) + mu_hat)[~valid]
# update bias parameter
mu_hat = Y_hat.mean(axis=0, keepdims=1)
# test convergence using relative change in trace norm
v = s.sum()
if ii >= maxiter or ((v - v_prev) / v_prev) < tol:
halt = True
ii += 1
v_prev = v
return Y_hat, mu_hat, U, s, Vt</pre><p>how to translate python code which use scipy, numpy to maple code</p>
<p> </p>
<p> </p>
<pre>import numpy as np
from scipy.sparse.linalg import svds
from functools import partial
def emsvd(Y, k=None, tol=1E-3, maxiter=None):
"""
Approximate SVD on data with missing values via expectation-maximization
Inputs:
-----------
Y: (nobs, ndim) data matrix, missing values denoted by NaN/Inf
k: number of singular values/vectors to find (default: k=ndim)
tol: convergence tolerance on change in trace norm
maxiter: maximum number of EM steps to perform (default: no limit)
Returns:
-----------
Y_hat: (nobs, ndim) reconstructed data matrix
mu_hat: (ndim,) estimated column means for reconstructed data
U, s, Vt: singular values and vectors (see np.linalg.svd and
scipy.sparse.linalg.svds for details)
"""
if k is None:
svdmethod = partial(np.linalg.svd, full_matrices=False)
else:
svdmethod = partial(svds, k=k)
if maxiter is None:
maxiter = np.inf
# initialize the missing values to their respective column means
mu_hat = np.nanmean(Y, axis=0, keepdims=1)
valid = np.isfinite(Y)
Y_hat = np.where(valid, Y, mu_hat)
halt = False
ii = 1
v_prev = 0
while not halt:
# SVD on filled-in data
U, s, Vt = svdmethod(Y_hat - mu_hat)
# impute missing values
Y_hat[~valid] = (U.dot(np.diag(s)).dot(Vt) + mu_hat)[~valid]
# update bias parameter
mu_hat = Y_hat.mean(axis=0, keepdims=1)
# test convergence using relative change in trace norm
v = s.sum()
if ii >= maxiter or ((v - v_prev) / v_prev) < tol:
halt = True
ii += 1
v_prev = v
return Y_hat, mu_hat, U, s, Vt</pre>213420Wed, 15 Jun 2016 01:54:00 Zasa12asa12