MATLAB Onramp 14.1 Project- Stellar Motion Task 7
232 次查看(过去 30 天)
显示 更早的评论
Modify the Task 2 & 7 section of the script so that it performs the red shift calculation on the second star in spectra, not the sixth.
I have changed s to the second column (s= spectra(:,2)), and that is right.
How do I get the correct values of lambdaHa and speed?
回答(6 个)
VAIBHAV PANDEY
2020-9-20
s = spectra(:,2)
[sHa,idx] = min(s)
lambdaHa = lambda(idx)
z = lambdaHa/656.28 - 1
speed = z*299792.458
6 个评论
patrick
2025-6-25
É preciso que a variavel s seja prenchida com o valor da 2 coluna antes de fazer a conta
s = spectra(:,2)
[sHa,idx] = min(s)
lambdaHa = lambda(idx)
z = lambdaHa/656.28 - 1
speed = z*299792.458
Othello Deemi
2022-8-12
Could some kindly help me with Tasks 2&7 on the MATLAB Onramp on the topic "Project > Stella Motion"?
Here is my answer:
s = spectra(:,2)
[sHa, idx] = min(s)
lambdaHa = lambda(idx)
z = (lambdaHa/656.28) - 1
speed = z*299792.458
I cannot go further beyond this point. Many thanks.
leela krishna
2024-5-20
[sHa,idx]=min(s)
lambdaHa=lambda(idx)
hold on
x=lambdaHa
y=sHa
plot(x,y,'rs','MarkerSize',8)
0 个评论
Prabhan Purwar
2020-7-14
Hi,
The correct values for lambdaHa and speed are calculated using Task 4. At every Task whole of the script runs not the portion of the same.
Thanks
0 个评论
PERUMALSAMY ROHANKUMAR
2023-2-1
[sHa,idx] = min(spectra(:,2))
to
[sHa,idx] = min(spectra)
3 个评论
NITHARSANA
2025-10-3,2:42
Add an if statement to the for loop body.if speed(v) is less than or equal to 0, create a plot of s against lambda using a dashed line(--). Add the command hold on between the two end keywords so that you only create one plot
duvan
2025-8-26
Tarea
Modifique la sección Tasks 2 & 7 del script para que realice el cálculo del desplazamiento al rojo con la segunda estrella de spectra en lugar de la sexta.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!