Receiving a "Array indices must be positive integers or logical values." message

1 vue (au cours des 30 derniers jours)
Qoran
Qoran le 29 Nov 2022
Modifié(e) : Chunru le 29 Nov 2022
How can I resolve this issue and proceed to plot it

Réponses (1)

Chunru
Chunru le 29 Nov 2022
Modifié(e) : Chunru le 29 Nov 2022
change the for loops into:
x = 1:.1:10;
results = abs(q) ./ (4*pi*e0*x.^2);
The original program has result(x) where x is not positive integer for arrray index

Catégories

En savoir plus sur Shifting and Sorting Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by