Community Profile

photo

Scott MacKenzie


York University

Last seen: 5日 前 2020 以来アクティブ

Statistics

  • 6 Month Streak
  • Revival Level 3
  • Knowledgeable Level 4
  • Pro
  • First Answer
  • Thankful Level 1

バッジを表示

Content Feed

表示方法

回答済み
Remove arrays from a cell based on certain conditions
If x is an array of numeric data, then if x(1) > x(end) clear x; end will delete the array x if the "first value is grea...

2ヶ月 前 | 0

回答済み
How do i quantize data with N levels?
y1 = discretize(y,8);

3ヶ月 前 | 0

回答済み
Turning categories into double
Let's assume T.Var1 is a categorical column in your table, as you describe it. To convert this to a column of double values, re...

3ヶ月 前 | 0

| 採用済み

回答済み
Is there a way to measure interletter spacing for Fixed Width font in MATLAB?
For text fonts, 1 pt = 1/72 inches. So, if you set the font size of the text to, say, 36 pt., the character height will be 1/2 ...

3ヶ月 前 | 0

回答済み
prepare a table for fitrm and manova
Using the example in the documentation for the manova function, here's a MANOVA for your data (attached): load atb; Meas = tab...

3ヶ月 前 | 0

回答済み
Producing the same-sized box plots for subfigures
One approach is just to use a dummy y-axis label for the plots in the 2nd and 3rd columns: if mod(i,3)==1 ylabel('Data'); ...

3ヶ月 前 | 0

| 採用済み

回答済み
Skipping a line no delimiters in an array
From your comment, it seems you are working with an Excel file, as opposed to comma-delimited text file. Given this and your ...

3ヶ月 前 | 0

| 採用済み

回答済み
Plotting time series of Velocity over 48 hours
% test value for Ttide (not given in question) Ttide = 1; figure(1); Vm=5.07; % Calculated on Paper %t=[1:1:48]; % Time ...

3ヶ月 前 | 0

| 採用済み

回答済み
How to find the common dates between two different variables that are not the same size or format?
% load dt and dt2, as per question load test % ignore minutes and seconds dt = dateshift(dt,'start','hour'); dt2 = datesh...

3ヶ月 前 | 0

回答済み
Array indices must be positive integers or logical values.
You've got a typo in your code. Change the indices 1i to i

3ヶ月 前 | 1

| 採用済み

回答済み
Round all values in table
I think this achieves what you are after: % test data T1 = array2table(rand(5)) % rounded to 2 decimal places T2 = array2tab...

3ヶ月 前 | 1

回答済み
Generate pure tone sequence in frequence domain
Seems you want to start by specifying your signals in the frequency domain, then convert to the time domain. I think this does ...

3ヶ月 前 | 0

| 採用済み

回答済み
Trying to find a value at a specific point in an array.
Just use H(Tmax) BTW, the value is 28106.

3ヶ月 前 | 0

| 採用済み

回答済み
Specify the path of X and Y axis (MATLAB)
After your plot command, add set(gca, 'xlim', [0 1], 'ylim', [0 1]);

3ヶ月 前 | 0

回答済み
Unable to use a value of type string as an index
Inside your loop, change catbl1(catbl1=x)=div*c; to catbl1(catbl1==x)=div*c;

3ヶ月 前 | 1

回答済み
Removing quotations from table display
Seems like you just want a more visually appealing presentation for the user. Something like this might work: vNames = {'a' 'a...

3ヶ月 前 | 0

| 採用済み

回答済み
from a circle to polygon
I know of no such formula, although no doubt one could be put together. You can think of circle as a polygon with a large (in...

3ヶ月 前 | 0

| 採用済み

回答済み
find the lowest value in a selection of data
[m, idx] = min(T(S1,6)); % minimum value in column 6, as per S1 x = T(idx,5); % value in column 5 at same location/r...

3ヶ月 前 | 0

| 採用済み

回答済み
Says "error using plot, vectors must be the same length"
Just a simple mistake. Change the 3rd line to xx1=linspace(0,8.*pi,100); Or, for higher resolution, change all the linspace f...

3ヶ月 前 | 1

| 採用済み

回答済み
Replacing some elements in the row with maximum value along the row
There might be a simpler solution, but this seems to work: A=[1 2 3 0 0; 7 4 5 1 0; 2 4 6 0 3] for i=1:size(A,1) A(i,...

3ヶ月 前 | 1

回答済み
How to prevent Matlab from rounding numbers when it saves them to a variable?
The rounding you are observing occurs through the num2str function. You can control this using one of the other variants of num...

3ヶ月 前 | 0

| 採用済み

回答済み
plotting 2 time series with errorbars along double y axis
I think this is more-or-less what you are after, based on the figure posted: % test data x = 1:10; A = [2 8 6 11 18 19 16 22 ...

3ヶ月 前 | 0

回答済み
How to plot x and y error bars together with the data points?
Something like this seems to work: % test data x = randi([2 8],1,5); y = randi([2 8],1,5); error_x = rand(1,5); error_y = r...

3ヶ月 前 | 0

| 採用済み

回答済み
The loop is continuously running
Your loop is fine, but is inefficient and takes a long time to execute. Instead of the loop, try this: [Lia, Locb] = ismember(T...

3ヶ月 前 | 0

| 採用済み

回答済み
How to grow a vector in a loop?
One approach is to declare coeff as an empty array before the first for-statement: coeff = []; then add new values to the end ...

3ヶ月 前 | 0

回答済み
How to create randi function between 0-500
Just use the imin-imax version of randi. For example n = randi([0, 500], 50, 1); generates a column vector of random integers...

3ヶ月 前 | 1

質問


Using F1 for help, gives help for wrong function
Consider this code snippet: plot(x, y1); % 2D line plot hold on; plot(x, y2); % 2D line plot plot(p); % polyshape plo...

4ヶ月 前 | 1 件の回答 | 0

1

回答

回答済み
Filling in missing data with previous data to perform calculations
Since you define bad or erroneous data as values equal to 500 or values less than 60, how about this. Replace the erroneous val...

4ヶ月 前 | 1

| 採用済み

回答済み
p value for two sets having variable x and y
Since for each system, y is the measured response for x, you can reduce the data for that set to x-y. Also, since the systems u...

4ヶ月 前 | 0

質問


ranksum function is purportedly the same as the Mann-Whitney U test, but the results differ. Is there a reason why?
I've written a script to implement the Mann-Whitney U non-parametric test. As a guide, I used a data set (attached) and example...

4ヶ月 前 | 0 件の回答 | 0

0

回答

もっと読み込む