Items tagged with import

Feed
Also available: import

A very big data was imported by me through

data := Import("http://fs3.fex.net/get/245716150875/11071260/data.txt");
"3.0994584798345
22.889020258043
....

26.082759642081
42.911810680717
6.4578968130322"



I need to convert it to Vector/Array. Now its type is "string":

whattype(data);
                             string

Here is my unsuccessful attempt:

convert(data,Vector);
Error, invalid input: `convert/Vector` expects its 1st argument, V, to be of type {Array, Matrix, Vector, array, sequential}, but received 3.0994584798345
22.889020258043
....

data.mw

How do cylinder (3D plot) from Excel file(csv)?

I have table in the Excel:

Angel(A)  length(cylinder) Function(sin(A)*EXP(1-L/1000)

1                 5                          0,05

2               10                          0,1

......

360         1000                      0

Please help me..

Dear All,

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?

Attached is the excel data.Collapsetime.xlsx 

Thank you.

Very kind wishes,

Wang Zhe

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".

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.

I think I am missing something here, so any advise/information/minimal commentary would be greatly appreciated.

Cheers, Ovle

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.

Hello all, 

A question concerning NetCdf files was asked in 2012 and is still unanswered today.
Browsing the questions only returns this item, suggesting the NetCdf topic is not a concern in the Maple community.
Nevertheless, does it exist some capabilities in reading and writting NetCDF files ?
If not, are there some planned development on the subject ?

Let's hope now for not having to wait four years for an answer, all responses will be greatly appreciated, even negative.

years


PS : NetCdf capabilities already exist in Sage or Mathematica

Dear Maple users

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!

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 ...

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!

 

Regards,

Erik

how to translate python code which use scipy, numpy to maple code

 

 

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

Is it possible to share contents between two different Maple worksheets ? Suppose for example, I want to use certain expression number (10) of  Worksheet 1 in worksheet 2, can I call that expression (10) in worksheet 2 ? I am asking this question because copying expressions between different worksheets is not easy task, sometime we unable copy expressions when they are too large. In my case after carrying out very tedious and lengthy calculations Maple stopped responding, now I have an idea that if I import last output of present worksheet in new worksheet may be I could continue my calculations.

Regards

hi

if possible to convert matlab file in to maple fie program??convert_to_maple_program.txt

thanks

 

Dear all,

I am looking at the help page for reading json files, but it is too advanced for me to understand...

Can anyone give an easy example where a json file is read into a variable and printing the data structure?

 

Hugs,
Louise =)

 

Hello all,

I have a hash structure with arrays in a YAML file that I would like to read in Maple.

Does there exist a module, so I can read it?

 

Hi guys,
I want to import symbolic matrix from matlab to Maple, How I can do that ? 


Hello,

Thanks to different posts of the subject "Exporting data from Excel to Maple", I could learn the method to do it and conduct it.

Now, I would like to store the data exported from Excel to Maple in the worksheet and make my worksheet independent from the excel sheet.

The idea is that I can send my worksheet to a collegue and he can use without the excel sheet.

May you advice me a strategy to store the imported data ?

The copy/ paste works but it doesn't look smart.

Thank you for your help.

 

Hello

Is there any option for impoting MATLAB's variables eith struct format (*.mat)?

Could you please to help me!

Thank you.

 

1 2 3 Page 1 of 3