Borrar filtros
Borrar filtros

How I can create a three dimensional succession

2 visualizaciones (últimos 30 días)
ric1321
ric1321 el 6 de En. de 2019
Comentada: Stephen23 el 6 de En. de 2019
Hi to everyone! What I would like to know is how I can define a 1x1xN element considering that in the third dimension I would like to have something like:
freq = (5:0.5:15)*1e9;
I hope I've been clear enough!

Respuesta aceptada

Stephan
Stephan el 6 de En. de 2019
freq(1,1,:) = (5:0.5:15)*1e9;
  2 comentarios
ric1321
ric1321 el 6 de En. de 2019
Thank you!
Stephen23
Stephen23 el 6 de En. de 2019
Note that this is fragile, and can throw an error if freq already exists in the workspace and has an incompatible size.

Iniciar sesión para comentar.

Más respuestas (2)

John D'Errico
John D'Errico el 6 de En. de 2019
Editada: John D'Errico el 6 de En. de 2019
As simple as one line like this:
freq = reshape((5:0.5:15)*1e9,1,1,[]);
As you can see, it has the desired shape.
size(freq)
ans =
1 1 21

madhan ravi
madhan ravi el 6 de En. de 2019
N=numel(freq);
f=zeros(1,1,N);
f(:,:,:)=freq

Categorías

Más información sobre Search Path en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by