Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Subscript indices must either be real positive integers or logicals

2 visualizaciones (últimos 30 días)
Newman
Newman el 2 de Feb. de 2016
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
hello i want to put the value of a stem plot into a single variable For eg look at the stem plot code below:
stem(a(1).sd(20,1:2, 5,1), abs(a(2).sf(20,1:2, 5, 1)));
It plots two impulse at different time .But i want to send this plot or values in this plot to a single variable.So that whenever i plot this varibale this gives the same plot as the previos one .For eg:
test=[];
test(a(1).sd(irr,1:Narr, ird, isd), abs(a(2).sf(irr,1:Narr, ird, isd)));
stem(test);
But whenver I am running this code its showing the following error:
Subscript indices must either be real positive integers or logicals
please tell me how to remove this error and plot the variable.

Respuestas (1)

Image Analyst
Image Analyst el 2 de Feb. de 2016
  2 comentarios
Newman
Newman el 2 de Feb. de 2016
Hey I have written this new code :
x= abs(ans.A(20,1:2, 5, 1));
y=abs(ans.delay(20,1:2, 5,1));
then I have multiplied each values so received by 1000 and rounded off but then when I am writing this
test=[];
test=(y,x);
Its saying index exceeds matrix dimensions
Image Analyst
Image Analyst el 2 de Feb. de 2016
ans is a built in return variable. I don't think you should be using it like that.
And you can't say
text = (y,x);
that's not proper MATLAB syntax. Try changing the parentheses to brackets.

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by