Answered
Plot data from a table that has years in the rows and months in the columns
This might be a reasonable start: T = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/608535/NOAA_CPC...

5 years ago | 0

Answered
Assigning multiple variables a single legend
I suggest you re-organize your data and use a single bar function using the 'stacked' property for barlayout. Do this and it's ...

5 years ago | 2

| accepted

Answered
Df2 of MANOVA
You can't use a manova tool, because you only have one dependent variable. For your data, the parametric Anova is probably the ...

5 years ago | 2

| accepted

Answered
Can you add a prompt that asks how many unknowns are in the simultaneous equations and selects a section from the code to answer the specific problem?
Your question suggests an arrangement something like this: n = input('Enter number of unknowns: '); switch n case 1 ...

5 years ago | 0

| accepted

Answered
bitget working with an example
Wow, I just looked and you're right about the documentation. The basic operation of bitget is to extract a bit from the binar...

5 years ago | 2

| accepted

Answered
How can I shuffle a matrix?
Looking only at your question (How can I shuffle a matrix?), here's one option: M = [1:5; 6:10; 11:15] r = randperm(numel(M));...

5 years ago | 0

| accepted

Answered
Lable with a duration
You don't "convert" a duration. You control the format via the 'format' property. Try... t1 = datetime; pause(1); t2 = dat...

5 years ago | 0

| accepted

Answered
How to make longer and thicker ticks in the colorbar?
Not sure the purpose, but this looks like what you're asking for... y = randi(10,1,5); tiledlayout('flow'); nexttile; ba...

5 years ago | 0

| accepted

Answered
writetable() to change header and append cell array in each row
t1 = table({'1'}, {'2'}, {'3'}); t2 = table({'4'}, {'5'}, {'6'}); t1.Properties.VariableNames = { 'col1', 'col2', 'col3' }; t...

5 years ago | 0

Answered
Replace Header & Append new row in writetable
testarray={'1 2 3'; '3 4 5'} z = split(testarray); T = array2table(z) T.Properties.VariableNames = { 'col1', 'col2', 'col3' }...

5 years ago | 0

| accepted

Answered
How to design a lowpass filter?
You can use smoothdata as a quick-and-dirty low pass filter: % sine wave with noise example y1 = sin(linspace(0,20*pi,200)); ...

5 years ago | 0

Answered
Delete every second element in array
As per your question (Delete every second element in array) ... x = 1:10 y = x(rem(x,2)==1) Output: x = 1 ...

5 years ago | 0

Answered
plot simple 2D-surface from 2D-vector valued function
Seems you just want the points and not the lines connecting the points. In that case, just add a line specifier to plot to speci...

5 years ago | 1

| accepted

Answered
displaying element of matrix
% assume M is a matrix of numeric values returned by your function fprintf('%.2f\n', M); % print all the values, 2 decimal pla...

5 years ago | 0

| accepted

Answered
How to read and process text file
filename = 'testdata.txt'; % data from question T = readtable(filename); s_mean = mean(T.Time); RFCR_mean = mean(T.RFCR) REC...

5 years ago | 0

| accepted

Answered
How to plot (bar) a negative data in the first quadrant?
The "wrong information" was in your question, as posted. I'll admit that my original solution was a bit odd, but it faithfully ...

5 years ago | 0

| accepted

Answered
How to plot (bar) a negative data in the first quadrant?
How about this: % your test data x = 0:1:10; y = [-1 -2 -4 -5 0 3 1 9 -2 -8 -1.5]; % determine which values of y are negat...

5 years ago | 0

Answered
Number of grid points inside circle
I only changed the 1st two lines. Is this what you are looking for? xq = repmat(-10:10,21,1); yq = xq'; a = 0:0.01:2*pi; % ...

5 years ago | 1

| accepted

Answered
How to count number of times 2 elements appear together in a table
p1 = 'person5'; % as an example p2 = 'person4'; % as an example sum(strcmp(T{:,2},p1) & strcmp(T{:,3},p2) & ... strcmp(T{...

5 years ago | 0

| accepted

Answered
How to get a velocity graph from recorded displacements and times?
I think this is potentially very simple. Let's remember, velocity is the distance traveled divided by the time taken. If you h...

5 years ago | 1

Answered
Assign value to variables
I'm not sure if this is helpful, but is seems to address the core issue you describe: c={'R1', 'R2', 'R3', 'R4'}; b=[1 0 0 1];...

5 years ago | 0

Answered
Fail to multiply column using .*
I'm not sure what the "big picture" is here, but if you are just trying multipy T1 times T2, then the fundamental problem is tha...

5 years ago | 0

Answered
How to write a for loop that saves every 100th value?
If I understand your quesiton correctly, a for-loop is not necessary. It seems you have an array emag with many values and a co...

5 years ago | 0

| accepted

Answered
Change colors of arrows in quiver3
Faraz's primary concern is controlling the color in each stratum of the plot. I think this is close to the answer sought: n = ...

5 years ago | 1

| accepted

Question


How to make Anova table for data from a factorial experiment
I'd like to know how MATLAB can be used to create an Anova table like this % ANOVA_table_for_Entry Speed (wpm) % =====...

5 years ago | 1 answer | 1

1

answer

Answered
Not enough input arguments
The error messages are clear enough. It seems you are using this function from the command prompt. The first error message (...

5 years ago | 0

| accepted

Answered
string array to excel
Am I missing something, or is this as simple as it seems: s = repmat(["a" "bcd"], 8, 7); % 8x14 string matrix writematrix(s, '...

5 years ago | 0

| accepted

Answered
histogram bins with different colors
I'm not sure if you can do this with histogram. Here's what I put together using histcounts and bar instead: d1 = rand(1531,1)...

5 years ago | 2

| accepted

Answered
what's code i can use for this equation ?
y = 4.1486 + 0.0917 * x - 0.6143 * x.^2 + 0.0083 * x .^3;

5 years ago | 0

Answered
How can I draw a histogram of my data?
load data; % loads data into vector mci threshold = 3; upper = ceil(max(mci)); d = histcounts(mci, 0:upper); bar(1:thres...

5 years ago | 0

| accepted

Load more