Unrecognized function or variable

9 vues (au cours des 30 derniers jours)
Deep Dave
Deep Dave le 18 Oct 2021
I am having a error in my code in line 5. The error is as shown below can someone please help me with it?
Unrecognized function or variable 'y_1_0'.
Error in BEProj (line 5)
generateParamY(subKey) = [y_1_0, y_2_0, y_3_0];
clc; clear all; close all;
subKey = '';
save('subkey.mat','subKey');
load('subkey.mat');
generateParamY(subKey) = [y_1_0, y_2_0, y_3_0];
[x_0_1 x_0_2 x_0_3] = generateParamX(subKey);
[epsilon, mu, alpha_1, alpha_2, alpha_3] = generateParam(subKey);
newper
df
decry
INVPER
INVIMAGE

Réponses (1)

Cris LaPierre
Cris LaPierre le 18 Oct 2021
You start your script with 'clear all', so no variables exist in your workspace. Then in your 5th line of code, you try to use y_1_0. What is this supposed to be? If it's a variable, it doesn't yet exist. If it's a function you wrote, MATLAB can't find it. The result is the error message you see.
I can duplicate the error here, too.
y_1_0
Unrecognized function or variable 'y_1_0'.

Community Treasure Hunt

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

Start Hunting!

Translated by