Giter Site home page Giter Site logo

Comments (4)

shwina avatar shwina commented on June 19, 2024

Can you provide a quick preview of what the code would look like with dir? Does dir have the same behaviour on all platforms?

from matlab-novice-inflammation.

gcapes avatar gcapes commented on June 19, 2024

The file name generation bit would look like this, and the rest of the script would be unchanged.

file_list = dir('*.csv');
for i = 1:length(file_list)
	data_file = file_list(i).name;
	img_file = replace(data_file, '.csv', '.png');
	img_file = replace(img_file, 'inflammation', 'patient_data');
end

I'd need to check that dir doesn't do anything different on Mac or Windows.

from matlab-novice-inflammation.

shwina avatar shwina commented on June 19, 2024

I think that looks fantastic, but remember that file_list here is a Cell Array (is that right?) that we haven't introduced. The dot operator is also new.

I'm completely in favour of introducing Cell Arrays before this section though.

from matlab-novice-inflammation.

gcapes avatar gcapes commented on June 19, 2024

Cool! file_list is a structure array, which of course will need explaining. I'll put something together and submit a PR for discussion.

from matlab-novice-inflammation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.