MATLAB Onramp 14.1 Project- Stellar Motion Task 7

192 ビュー (過去 30 日間)
Prem Pankaj
Prem Pankaj 2020 年 7 月 11 日
コメント済み: NITHARSANA 2025 年 10 月 3 日
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?
  2 件のコメント
Divyanshu
Divyanshu 2025 年 4 月 29 日
Modify the Task 2 & 7 section of the script so that it performs the redshift calculation on the second star in spectra, not the sixth.
Divyanshu
Divyanshu 2025 年 4 月 29 日
Did you store the correct wavelength in lambdaHa?
Did you store the correct speed in speed?

サインインしてコメントする。

回答 (6 件)

VAIBHAV PANDEY
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 件のコメント
James D
James D 2024 年 5 月 2 日
Why
patrick
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
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
leela krishna 2024 年 5 月 20 日
[sHa,idx]=min(s)
lambdaHa=lambda(idx)
hold on
x=lambdaHa
y=sHa
plot(x,y,'rs','MarkerSize',8)

Prabhan Purwar
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

PERUMALSAMY ROHANKUMAR
PERUMALSAMY ROHANKUMAR 2023 年 2 月 1 日
[sHa,idx] = min(spectra(:,2))
to
[sHa,idx] = min(spectra)
  3 件のコメント
Öznur
Öznur 2024 年 3 月 3 日
hold on
plot(lambdaHa,sHa,"rs",'MarkerSize',8)
NITHARSANA
NITHARSANA 2025 年 10 月 3 日

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
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.

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by