Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab questions: Easy peasy for the pro's

  1. Aug 4, 2010 #1
    Looking for a bit of cheeky help with matlab, im stumped!

    1) I have written a program that i want to cycle through different sets of data, ideally this is what i would like:
    These are all xls files with columns of data

    ydata = ...
    xdata = ...
    zdata = ...

    for variable = ydata:xdata:zdata
    do function to each of the variables seperatly
    write function results(variable) and save data

    Is this possible?

    2) When calling a file name eg:

    [FTSE] = xlsread('Normalised Smooth Data.xlsx', 'FTSE', 'A1:A300')

    I want to replace 300 with a variable rather than changing many of them manually everytime i need to change that number, so i would have something like this:

    numberofpoints = 300
    [FTSE] = xlsread('Normalised Smooth Data.xlsx', 'FTSE', 'A1:Anumberofpoints')

    Again, is this possible? Im sure it is i just dont know the key commands.

    Any help would be much appretiated.


  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted