MATLAB Onramp 14.1 Project- Stellar Motion Task 7

조회 수: 235 (최근 30일)
Prem Pankaj
Prem Pankaj 2020년 7월 11일
댓글: NITHARSANA 2025년 10월 3일 2:42
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일 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
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 CenterFile Exchange에서 2-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