File Issues after copying from another PC
5 views (last 30 days)
Show older comments
I copied over a set of files from my workstation to use on my laptop when working in the labratory. The script runs fine when using the workstation but comes up with an error when used on my laptop. I didn't write this code a former student at my university did but I need to alter his plots using the file. I'm new to MATLAB, and added the Raw Tension Data to the file path, and tried restarting the program/computer. I can't seem to figure this out on my own. I've used other files the former student created with minimal issues on my laptop, this one is hanging me up.
Incorrect number or types of inputs or outputs for function resample.
Error in TensionPlots (line 7)
TPS_1 = resample(readmatrix('Raw Tension Data\PS-1.csv', 'NumHeaderLines',1),10,100);![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1717281/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1717281/image.png)
0 Comments
Accepted Answer
Star Strider
on 17 Jun 2024
Edited: Steven Lord
on 17 Jun 2024
The resample function is part of the Signal Processing Toolbox. You need to have the Toolbox licensed and installed before you can use the function.
That particular call to it resamples the entire file at 10/100 times the original sample rate, literally decimating it, and returns it to your workspace as the ‘TPS_1’ variable. It operates down the columns, resampling each column.
[SL: fixed typo in toolbox name]
3 Comments
Star Strider
on 17 Jun 2024
As always, my pleasure!
I’m not certain there’s an efficient way to do that. You might need to check with the author of the original code. In some instances, the code could throw the error ‘##### function is part of the #### Toolbox’, however if there is more than one function by that name, as here, you will likely get a different (and less-than-desirably-informative) error.
.
Star Strider
on 17 Jun 2024
@Steven Lord — Thank you (belatedly). I do my best to proofread what I post. I don’t always catch all my typos.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!