Borrar filtros
Borrar filtros

Can you explain ?

1 visualización (últimos 30 días)
Srtm
Srtm el 30 de Jun. de 2022
Comentada: Rik el 19 de En. de 2023
Could you please explain this line to me
a=min(b):0.001:max(c);
  1 comentario
Rik
Rik el 19 de En. de 2023
I recovered the removed content from the Google cache (something which anyone can do). Editing away (part of) your question is very rude. Someone spent time reading your question, understanding your issue, figuring out the solution, and writing an answer. Now you repay that kindness by ensuring that the next person with a similar question can't benefit from this answer.

Iniciar sesión para comentar.

Respuesta aceptada

KSSV
KSSV el 30 de Jun. de 2022
Thats is simple....
min(b)--> this takes minimum value from b
max(c)--> this picks maximum from c
a:b--> this will gnerate numbers between a and b with a difference of 1.
a:dx:b----> this will generate numbers between a and b with a difference given dx.
% EXample
a = 0 ;
b = 1;
dx = 0.1 ;
x = a:dx:b
x = 1×11
0 0.1000 0.2000 0.3000 0.4000 0.5000 0.6000 0.7000 0.8000 0.9000 1.0000
length(x)
ans = 11
diff(x)
ans = 1×10
0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000
  2 comentarios
Srtm
Srtm el 30 de Jun. de 2022
can you explain this?
n=size(data,1);
for i=1:n
a_trn(2*i-1)=b(i);
a_trn(2*i)=b(i);
end
Steven Lord
Steven Lord el 30 de Jun. de 2022
I'm guessing from these questions that you're fairly new to MATLAB. Am I correct? If so I suggest you start with the free MATLAB Onramp tutorial to quickly learn the essentials of MATLAB. After completing that tutorial the code segments you've posted should make more sense.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Historical Contests en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by