MATLAB Onramp 14.1 Project- Stellar Motion Task 7

228 visualizzazioni (ultimi 30 giorni)
Prem Pankaj
Prem Pankaj il 11 Lug 2020
Spostato: Dyuman Joshi il 20 Mar 2024
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?
  5 Commenti
Abhishek
Abhishek il 22 Ott 2023
Add an else statement if speed (v) is greater than 0 create a plot of s against lambda using a line width of 3

Accedi per commentare.

Risposte (4)

VAIBHAV PANDEY
VAIBHAV PANDEY il 20 Set 2020
s = spectra(:,2)
[sHa,idx] = min(s)
lambdaHa = lambda(idx)
z = lambdaHa/656.28 - 1
speed = z*299792.458
  4 Commenti
Jayleen
Jayleen il 1 Feb 2023
just take the second and third line for task 4
Deeksha
Deeksha il 4 Set 2023
tast 2 & 7
s=spectra(:,2)
Did you store the second column of spectra in s?------> this error is not remove..why?

Accedi per commentare.


Othello Deemi
Othello Deemi il 12 Ago 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.

Prabhan Purwar
Prabhan Purwar il 14 Lug 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 il 1 Feb 2023
[sHa,idx] = min(spectra(:,2))
to
[sHa,idx] = min(spectra)
  3 Commenti
Öznur
Öznur il 3 Mar 2024
hold on
plot(lambdaHa,sHa,"rs",'MarkerSize',8)

Accedi per commentare.

Categorie

Scopri di più su Debugging and Analysis in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by