Skip to content
This repository was archived by the owner on Nov 25, 2018. It is now read-only.
This repository was archived by the owner on Nov 25, 2018. It is now read-only.

Builtin type can be used for .mlapp -> .m conversion on new MATLAB #8

Closed

Description

@Dev-iL

This basically saves us the hassle of unzipping and stripping of the xml...

This functionality was probably added in MATLAB R2016a with the release of the App Designer, so regex-based code is probably still relevant when converting using older versions.

Activity

  1. sco1 commented on May 2, 2016

    @sco1
    Member

    Interesting, good find!

    I just tested that using diary to pipe the output to an *.m file functions correctly, but it adds leading and trailing diary commands that need to be removed. It can also be piped to a string with evalc and written to a file with fprintf, which may be the most time expedient option.

    I'll add in a check for versions >= R2016a to utilize one of these options to avoid the overhead of unzipping.

  2. self-assigned this
    on May 2, 2016
  3. sco1 commented on May 3, 2016

    @sco1
    Member

    type works on *.mlapp files in R2015b as well, I don't have any other old versions to test with.

  4. Dev-iL commented on May 3, 2016

    @Dev-iL
    MemberAuthor

    Just tested on 2015a - works.

  5. Dev-iL commented on May 3, 2016

    @Dev-iL
    MemberAuthor

    @AnderBiguri tested this on 2014b and it still works. @adeak tested it on 2012b and it doesn't.

  6. sco1 commented on May 3, 2016

    @sco1
    Member

    The App Designer tech preview was released in October 2014, so I was thinking R2014b or R2014a would have been the earliest they'd start incorporating support. I'll set the flag to R2014b for now.

  7. added a commit that references this issue on May 3, 2016
    f986a72
  8. sco1 commented on May 3, 2016

    @sco1
    Member

    Should be in now but the regular expressions will need to be compared between versions. The "old" MATLAB handling reads every line of the XML file into its own cell but the type approach reads everything into a single character array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions