File Issues after copying from another PC
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
Star Strider
il 17 Giu 2024
Modificato: Steven Lord
il 17 Giu 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 Commenti
Star Strider
il 17 Giu 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
il 17 Giu 2024
@Steven Lord — Thank you (belatedly). I do my best to proofread what I post. I don’t always catch all my typos.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Install Products in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!