How to solve this issue :Error: File: FormatDataNew.m Line: 1 Column: 59 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parenthese

조회 수: 1 (최근 30일)
the error seems to come from this line:
function [dat_AP,Amp_AP,Ph_AP,Fs_AP,TD_P] = FormatDataNew('moh.txt')
please explain what could be the problem.

채택된 답변

Cris LaPierre
Cris LaPierre 2021년 1월 22일
편집: Cris LaPierre 2021년 1월 22일
This appears to be your function declaration line. If so, appear to have declared it using the calling syntax. You should replace 'moh.txt' with a variable name (no quotes).
function [dat_AP,Amp_AP,Ph_AP,Fs_AP,TD_P] = FormatDataNew(file)
Then in your script when you call your function, that is when you use the actual file name.
[dat_AP,Amp_AP,Ph_AP,Fs_AP,TD_P] = FormatDataNew('moh.txt');
See this page for more on declaring functions.

추가 답변 (1개)

Steven Lord
Steven Lord 2021년 1월 23일
See my answer on this question.

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by