フィルターのクリア

File Issues after copying from another PC

8 ビュー (過去 30 日間)
John
John 2024 年 6 月 17 日
コメント済み: Star Strider 2024 年 6 月 17 日
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);

採用された回答

Star Strider
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
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
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 件)

製品


リリース

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by