MATLAB Onramp 14.1 Project- Stellar Motion Task 7

245 Ansichten (letzte 30 Tage)
Prem Pankaj
Prem Pankaj am 11 Jul. 2020
Kommentiert: NITHARSANA am 3 Okt. 2025 um 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 Kommentare
Divyanshu
Divyanshu am 29 Apr. 2025
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 am 29 Apr. 2025
Did you store the correct wavelength in lambdaHa?
Did you store the correct speed in speed?

Melden Sie sich an, um zu kommentieren.

Antworten (6)

VAIBHAV PANDEY
VAIBHAV PANDEY am 20 Sep. 2020
s = spectra(:,2)
[sHa,idx] = min(s)
lambdaHa = lambda(idx)
z = lambdaHa/656.28 - 1
speed = z*299792.458
  6 Kommentare
patrick
patrick am 25 Jun. 2025
É 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

Melden Sie sich an, um zu kommentieren.


Othello Deemi
Othello Deemi am 12 Aug. 2022
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 am 20 Mai 2024
[sHa,idx]=min(s)
lambdaHa=lambda(idx)
hold on
x=lambdaHa
y=sHa
plot(x,y,'rs','MarkerSize',8)

Prabhan Purwar
Prabhan Purwar am 14 Jul. 2020
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 am 1 Feb. 2023
[sHa,idx] = min(spectra(:,2))
to
[sHa,idx] = min(spectra)
  3 Kommentare
Öznur
Öznur am 3 Mär. 2024
hold on
plot(lambdaHa,sHa,"rs",'MarkerSize',8)
NITHARSANA
NITHARSANA am 3 Okt. 2025 um 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

Melden Sie sich an, um zu kommentieren.


duvan
duvan am 26 Aug. 2025
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.

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by