Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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 ...

plus de 5 ans il y a | 2

| A accepté

Réponse apportée
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 ...

plus de 5 ans il y a | 2

| A accepté

Réponse apportée
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 ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 2

| A accepté

Réponse apportée
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));...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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' }...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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)); ...

plus de 5 ans il y a | 0

Réponse apportée
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 ...

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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; % ...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
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{...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 1

Réponse apportée
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];...

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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 = ...

plus de 5 ans il y a | 1

| A accepté

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) % =====...

plus de 5 ans il y a | 1 réponse | 1

1

réponse

Réponse apportée
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 (...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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, '...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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)...

plus de 5 ans il y a | 2

| A accepté

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

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Charger plus