I have written a code in matlab script and integrated into labview. The script has to do some function with s2p file. Instead of writing the filename in the script everytime manually I want the script to read the filename from the labview with some kind of input. for example
The script has one of the following code
measured_raw_data = read(rfdata.data,'D5.s2p');
where the file name "D5.s2p" should be automatically read from the input which I create on the script node. For some reasons the read function of the matlab only relies on the filename specified within the function. I have created an input string "a" to which I have a string control and I am modifying the function as
measured_raw_data = read(rfdata.data,'a');
When I do so the matlab gives me an error saying that "a" is not an s2p file. Any help guys ?