Risposto
Image plot with quiver vector overlain
quiver is drawing on top of the image. You haven't provided any data or code that can be executed, so it's hard to tell what th...

circa 2 anni fa | 0

Risposto
How to read array from a text file into each row of a matrix.
OK, this should work. First, combine dir and pktFile using the fullfile function. Read the data using readtable, then restore ...

circa 2 anni fa | 0

Risposto
Two way Repeated Measures ANOVA two different ways
@Mark Robinson The reason anovan and ranova give different results is that the within table in your solution using ranova is not...

circa 2 anni fa | 1

| accettato

Risposto
How to import .csv files, keeping all the headers (which are on multiples rows) in order to extract some information from the headers?
Assuming your files are consistently formatted, here's one way to extract the data values in the header lines and then read the ...

circa 2 anni fa | 1

| accettato

Risposto
Divide data in parts and plot them on a vertical line
From your description, this seems to work: M = [ 0.873615503511876 100 3.3; 0.902974727374816 100 3.3; 0.90067...

circa 2 anni fa | 0

Risposto
How do I make a vector containing 30 cells that range from -5 to 45?
randi([-5 45],1,30)

circa 2 anni fa | 0

| accettato

Risposto
How to remove rows with zeros in selected columns?
There is probably a simpler solution, but this will work... a = [ 1 0 5 0 6 2 0 0 0 0 3 3 5 9 12 4 0 0 0 0...

circa 2 anni fa | 0

| accettato

Risposto
Easiest way to create a line from 2 XY coordinates
MATLAB's hypot function is probably your best bet: M = [0 125.1673584 13.18046188 194.4534607 176.9597931; 1 126.4874725 ...

circa 2 anni fa | 0

| accettato

Risposto
Creating subset of table
Since column 1 contains numbers in cells, something like this is needed: T = array2table([{1, -2, 3}' {'a' 'b' 'c'}']) % test d...

circa 2 anni fa | 0

Risposto
How to preform Anova + Tukey for within-subject design
I believe the issue is you've incorrectly specified the variable as the second argument in multcompare. Try tbl = multcompare(...

circa 2 anni fa | 0

Risposto
Repeated measure ANOVA in MATLAB
What you have is a 2 x 4 within-subjects design. The independent variables are "Method" (2 levels) and "Case" (4 levels). You d...

circa 2 anni fa | 1

| accettato

Risposto
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...

oltre 2 anni fa | 0

Risposto
How do i quantize data with N levels?
y1 = discretize(y,8);

oltre 2 anni fa | 0

Risposto
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...

oltre 2 anni fa | 0

| accettato

Risposto
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 ...

oltre 2 anni fa | 0

Risposto
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...

oltre 2 anni fa | 1

| accettato

Risposto
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'); ...

oltre 2 anni fa | 0

| accettato

Risposto
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 ...

oltre 2 anni fa | 0

| accettato

Risposto
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 ...

oltre 2 anni fa | 0

| accettato

Risposto
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...

oltre 2 anni fa | 0

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

oltre 2 anni fa | 1

| accettato

Risposto
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...

oltre 2 anni fa | 1

Risposto
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 ...

oltre 2 anni fa | 0

| accettato

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

oltre 2 anni fa | 0

| accettato

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

oltre 2 anni fa | 0

Risposto
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;

oltre 2 anni fa | 2

Risposto
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...

oltre 2 anni fa | 0

| accettato

Risposto
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...

oltre 2 anni fa | 0

| accettato

Risposto
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...

oltre 2 anni fa | 0

| accettato

Risposto
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...

oltre 2 anni fa | 1

| accettato

Carica altro