File Issues after copying from another PC
7 次查看(过去 30 天)
显示 更早的评论
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);

0 个评论
采纳的回答
Star Strider
2024-6-17
编辑:Steven Lord
2024-6-17
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 个评论
Star Strider
2024-6-17
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
2024-6-17
@Steven Lord — Thank you (belatedly). I do my best to proofread what I post. I don’t always catch all my typos.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Install Products 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!