Index exceeds the number of array elements. Index must not exceed 1.

1 vue (au cours des 30 derniers jours)
A Poyser
A Poyser le 27 Oct 2022
Commenté : A Poyser le 27 Oct 2022
This line of code is giving me the above error message
T = k^2 * Em(k) * (((k^2 - mean_nu) * E(k) + mean_nu *crack_aspect_ratio^2 * Gm * k)^-1 + (( k^2 + (Mean_nu * crack_aspect_ratio^2) ) * Em * (k) - Mean_nu * crack_aspect_ratio^2 * Gm * k)^-1)
Unrecognized function or variable 'k'.
Could someone please explain how to rectify the problem

Réponse acceptée

Torsten
Torsten le 27 Oct 2022
You use Em(k) and Em * (k) in this line of code. Both cannot be correct, I guess.
Further check out whether E(k) is correct: E is treated as an array where the k-th element is referenced or as a function that is called with input argument 1.
  1 commentaire
A Poyser
A Poyser le 27 Oct 2022
I realised this shortly after writing the question. Thanks.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Tags

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by