Homework Help

13 years ago
Posts: 437
Quote from Bafflement
Could you be more specific about what is going wrong for you? I don't know much about Matlab, so I don't really know what's going wrong... Basically I have a 3052 by 1 matrix (if you graph this, you can see there is a jump around 1020 and also at 2034) and it should be processed using this code. One of the steps in the code is to stitch the graph so that it looks continuous, but in the output, it's clearly not stitched.
Quote from HikaruYami
In such cases, rather than make an enormous graph with hard-to-see data specks, the normal method is annotating the axes with two small arrows going into and out of the graph, that stands for "there is a large gap here that is not physically represented" Ah... I know what you mean; in a case where there is a gap in the data, you can make a dashed line or double slash on the appropriate axis showing that a portion of it is skipped.
But for my data, the gap is artificial and needs to be eliminated, and this function is supposed to do that. (For example, if point 1018 is 401, point 1019 is 402, point 1020 is 503, point 1021 is 504; you can see that the data jumps by 100 between 1019 and 1020. This function should elminate that jump so that the data will be 401, 402, 403, 404.)

13 years ago
Posts: 161
Quote from lynira
Quote from Bafflement
Could you be more specific about what is going wrong for you? I don't know much about Matlab, so I don't really know what's going wrong... Basically I have a 3052 by 1 matrix (if you graph this, you can see there is a jump around 1020 and also at 2034) and it should be processed using this code. One of the steps in the code is to stitch the graph so that it looks continuous, but in the output, it's clearly not stitched.
The short answer is that the program scales the plot according to the calibration data, and there's no discontinuity in your calibration input, only in your spectral data.

13 years ago
Posts: 437
Quote from Bafflement
The short answer is that the program scales the plot according to the calibration data, and there's no discontinuity in your calibration input, only in your spectral data. You mean that the function is only stitching the calibration input and nothing else? But the line "SPECraw0=[SpecIn(1:stpts(1)-1);SpecIn(stpts(1):stpts(2)-1)*stmags(1);SpecIn(stpts(2):end)*stmags(1)*stmags(2)]-DKraw;" should stitch SpecIn, shouldn't it? Is there something wrong with this line, making it not work?

13 years ago
Posts: 161
Quote from lynira
Quote from Bafflement
The short answer is that the program scales the plot according to the calibration data, and there's no discontinuity in your calibration input, only in your spectral data. You mean that the function is only stitching the calibration input and nothing else? But the line "SPECraw0=[SpecIn(1:stpts(1)-1);SpecIn(stpts(1):stpts(2)-1)*stmags(1);SpecIn(stpts(2):end)*stmags(1)*stmags(2)]-DKraw;" should stitch SpecIn, shouldn't it? Is there something wrong with this line, making it not work?
No, the rescaling is applied to the spectral data, as you see in that line. However, the rescaling factor only depends on the calibration input. Look at line 18, where the scaling factor from the line you quoted is defined.

13 years ago
Posts: 437
Quote from Bafflement
No, the rescaling is applied to the spectral data, as you see in that line. However, the rescaling factor only depends on the calibration input. Look at line 18, where the scaling factor from the line you quoted is defined. Ah, I see what you mean. So if I change the scaling factor to depend on SpecIn instead (like this: "stmags=[SpecIn (stpts(1)-1)/SpecIn(stpts(1)),SpecIn (stpts(2)-1)/SpecIn(stpts(2))];"), it will stitch SpecIn? (Unfortunately, I don't have access to Matlab right now, so I can't test it till I get to a computer lab tomorrow.)
But will changing stmags to depend on SpecIn mess up the spectra that don't need to be stitched (DkIn and CalIn)? And if so, can I fix that by making a version of stmags for each of these three spectra (and then of course calling the proper stmags version in each stitching line)?
Sorry for all the questions and thank you for all your help! I really, really appreciate it.

13 years ago
Posts: 161
Quote from lynira
Ah, I see what you mean. So if I change the scaling factor to depend on SpecIn instead (like this: "stmags=[SpecIn (stpts(1)-1)/SpecIn(stpts(1)),SpecIn (stpts(2)-1)/SpecIn(stpts(2))];"), it will stitch SpecIn? (Unfortunately, I don't have access to Matlab right now, so I can't test it till I get to a computer lab tomorrow.)
But will changing stmags to depend on SpecIn mess up the spectra that don't need to be stitched (DkIn and CalIn)? And if so, can I fix that by making a version of stmags for each of these three spectra (and then of course calling the proper stmags version in each stitching line)?
Making a separate stmags for each input should make the plot continuous. I can't say whether that's a suitably accurate representation of your data without knowing more about it. There will also still be a problem with the end of the plot getting cut off because your wavelength data covers a larger range than the hardcoded calibration data included in the program.
Sorry for all the questions and thank you for all your help! I really, really appreciate it.
No worries. It lets me practice my Matlab understanding and gives me a short distraction from my own work, which can be welcome even if it is technically procrastination!

12 years ago
Posts: 318
Can anyone tell me how I should cite this material in my research paper in MLA format (in text citation&in references page)? 😕

12 years ago
Posts: 15
All your MLA formatting needs can be found on Purdue OWL 😀
For in-text citation, you'll simply put the author's last name in parentheses after your quote or paraphrase. For your specific source, there are two authors, but the same concept still applies.
"Across the world men and women have different roles in society and within the family" (Tanturri and Mencarini 2).
You must also include the page number for that specific quote. For your works cited, this will do:
Tanturri and Mencarini. "Fathers’ involvement in daily childcare activities in Italy: does a work-family reconciliation issue exist?" Centre for Household, Income, Labour and Demographic Economics, 2009. PDF file.
[img]http://i1080.photobucket.com/albums/j333/wutkyle811/misaki.png[/img]
[color=black]"It's just pure, mindless vandalism!" -Robert Sheehan[/color]

12 years ago
Posts: 318
Thank you!! 😀 and thanks for the website too! I imagine I'll be using it a lot in the future. 🙂

12 years ago
Posts: 15
No problem! I'm bored!
[img]http://i1080.photobucket.com/albums/j333/wutkyle811/misaki.png[/img]
[color=black]"It's just pure, mindless vandalism!" -Robert Sheehan[/color]

12 years ago
Posts: 318
You have $15,000 in your bank account, later it increases to $21,000. What was the percent increase?

12 years ago
Posts: 26
40% increase.
^,..,^ Vampys Rule!
[{(ヴァンパイアルール!)}]
---and---
ZaYuriMonsta---->X
@}--'--,-百合のモンスターはここにimaした

12 years ago
Posts: 318
Quote from pandasamurai
40% increase.
6000/15000*100, right?
Thanks 🙂

12 years ago
Posts: 208
"The first glance of a soul which does not yet know itself is like the dawn in the sky."
Can this count as an analogy or is it just a simile? Or both? Thanks(:

12 years ago
Posts: 1737
A simile is basically an analogy between two things with the use of "like" or "as."
Nulla in mundo pax sincera
"Always go too far, because that's where you'll find the truth." - Albert Camus