I know you do not have the first part of the function. Looking for the format of
ID: 3758428 • Letter: I
Question
I know you do not have the first part of the function. Looking for the format of how to do something like this.
Write a MATLAB script M-file named TriangleType that will load a file of triangles, and use the function from Part 1 to determine if the triangles are acute or obtuse. A message should be printed to the screen for each triangle.
The triangles will be contained in a text file named Triangles.txt. This file will have three columns, one for each side. Every row in the file will correspond to a triangle. The triangles will be either acute or obtuse—there will be no right triangles, nor any non triangles.
Example:
Given a text file with this data:
The script file should produce the following output to the Command Window:
Code Requirements:
The script file must call (use) the function IsAcuteTriangle to determine the type of triangle. No credit will be given if this is done any other way.
The script file must load and use a text file named Triangle.txt with data formatted as specified above.
Explanation / Answer
Cancellation tasks are easy to administer, and spatially biased performance is a strong predictor of other neglect symptoms such as biased spontaneous deviation of the head and eyes and ignoring contralesionally located people or objects (Ferber and Karnath, 2001).
Despite these benefits, there are no sophisticated measures for interpreting these tests. Using simple cutoffs such as omitting 5% or more of the targets will detect both spatially biased and unbiased attentional deficits. However, only patients with spatially biased performance are likely to exhibit the other symptoms of spatial neglect. Therefore, if one wants a sensitive measure for neglect, one needs to account for both the number of errors and the spatial distribution of these errors. Further, classification of patients into either the presence or absence of neglect does not seem like a good approach, as this disorder is actually a continuum, with some individuals showing mild deficits while others show more severe deficits.
We suggest that calculating the center of mass for the detected items is a simple way to interpret the popular cancellation task. One simply sums the horizontal position for each detected item divides this by the number of targets detected. This mean position is sensitive to the spatial bias, and is able to distinguish between mild and severe forms of bias. To make this measure easy to interpret, we suggest that this bias is normalized: the mean horizontal position is translated so that the mean for all items is zero (baseline correction) and the scale of the horizontal axis is adjusted so the range between the leftmost and rightmost target is 2. We refer to this index as the “Center of Cancellation” (CoC). Using this measure, individuals who identify all targets will score zero, individuals who only identify the left most item will receive a score near -1 and individuals who only identify the rightmost items will receive a score near +1. This intuitive scale is easy to remember, being analogous to scales for correlation values.
We believe that measuring the center of cancellation was first implemented by Binder and colleagues (1992). That manuscript was seminal in understanding how anatomy dissociates between line-bisection and cancellation deficits. However, their measure for cancellation performance has faded into obscurity (perhaps because they treated it as a binary classifier, their focus on anatomy, or the fact that they did not provide software to easily implement their measure). We hope that our software and validation (Rorden and Karnath, 2010) inspire a revival of this elegant measure.