'Undefined function 'getSignal' for input arguments of type 'cell

2 次查看(过去 30 天)
Hi MATLAB Comunity,
I try to run 2 function wwhich runs consecutively in the same section;
First one extract the all files from all zipped subfolder in a folder and second one reads some of this extracted files.
When I run them consecutively , i got error 'Undefined function 'getSignal' for input arguments of type 'cell'. '
I guess the reason behind the error is that when I run the first function current folder is changing. And when I run the first function and etract the files and then change the current folder by hand (with blue arrow over the Current Folder) and run the second function it works
but consecutively the programm does not work. How can I run them consecutively as I want to run them in a for loop later.
I appreciate a lot if anyone can help me :) thanks a lot in advance.
  1 个评论
KSSV
KSSV 2022-5-19
You have to check the input to the function. You are input is a cell which the function do not accept.

请先登录,再进行评论。

回答(1 个)

Kshittiz
Kshittiz 2023-9-28
Hi Mesut,
I understand you are trying to run two functions in MATLAB consecutively. The first function extracts files from zipped subfolders in a folder and the second function reads some of the extracted files. When running them together, an error is being encountered.
The issue you are encountering could be due to the change in the current folder. MATLAB looks for functions in the current folder and its subfolders, so if you change the current folder in between function calls, MATLAB might not be able to find the function you are trying to call.
Here are a few workarounds to help you fix this issue:
  1. Instead of relying on the current folder, use absolute paths to specify the locations of the files you're working with.
  2. If you need to change the current folder within your script, you can do by using the ‘cd’ command. Make sure to change it back to the original folder after you are done.
To learn more about the ‘cd’ command, refer the following documentation: https://in.mathworks.com/help/matlab/ref/cd.html
I hope this will help you in fixing the issue.
Regards,
Kshittiz

类别

Help CenterFile Exchange 中查找有关 File Operations 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by