Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Digitise a signal to retrieve sample data in Scilab/Matlab

  • 30-09-2005 7:04pm
    #1
    Closed Accounts Posts: 820 ✭✭✭


    Hi,

    I need to acquire sampling data for my thesis. I've been told the best way I can do this is to create a slow changing signal in Matlab and digitising it. In other words i want a text file with all the samples in it. Can anyone help me out here and tell me how i would achieve this. I don't know how to use Matlab or Scilab. I've got scilab installed on my machine but i don't have access to Matlab. I've breezed over the documentation and i've put posts up on newsgroups asking for help but no one is replying..

    Thanks


Comments

  • Subscribers Posts: 16,617 ✭✭✭✭copacetic


    not familiar with scilab but it's just a function in matlab.
    do they have a copy of matlab in college you could use?


  • Closed Accounts Posts: 820 ✭✭✭qBot


    Ya its installed on the machines alright but Im at home atm writing it up so have no access to it. Unfortunately I have no experience with matlab at all. I got a reply from the comp.soft-sys.math.scilab newsgroup alright but it was short and snotty. Take a look here. I have no idea what a matrix is or how to use it. Ive looked at the documentation alright. It's exactly the same as what you get when you type "help text" into the console. Maybe you could help me out from what this guy has replied with?


  • Subscribers Posts: 16,617 ✭✭✭✭copacetic


    wasn't very helpful alright, looks like he has just printed an example of how to open a text file and enter the values into it.
    the first and last bits look to be opening and closing the file and putting a header in
    it, then
    a=rand(6,6); is making i guess a 6x6 matrix (row and col of 36 values) rand is filling it
    with random values.
    for i=1:6 , use i to cycle though each row value and j to cycle through each col
    for j=1:6, mfprintf(fd,'%5.2f ',a(i,j)); print the value , the 5.2f is number of character not positive but this prob sets it to 5 overall and 3 after decimal place and a(i,j) is the matrix value at col value i and row j
    end;
    mfprintf(fd,'\n'); print a newline character at the end.


    In my opinion if is only helpful if you already have your values in a array or matrix.
    However if you can graph them then they are already a 'digitised' signal asuch.
    Look up some stuff in the help for functions that generate samples like the randn one used above, to avoid the matrix stuff use rand(36) I'd imagine would just give you 36 sample in '1D' or a 36x1 matrix..


  • Subscribers Posts: 16,617 ✭✭✭✭copacetic


    oh yeah, if you have how you generate your signal that would help, if using a std function you usually specify the sampling rate when you generate it.

    this could be why you can't find help on 'digitising' a signal, your data is already
    made up of samples..


  • Closed Accounts Posts: 820 ✭✭✭qBot


    Thanks a mill. I think i've got a bit of a grasp as to what is going on now. You've been a great help.. Might have more questions for you later though.


  • Advertisement
Advertisement