Réponse apportée
Griddata doesn't reach sample points
Here is the relevant line of the documentation for griddata that explains what is happening: "For all interpolation methods oth...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Help using tiledlayout and nexttile functions
It's unclear to me what you are expecting to get, but this code works exactly as I would expect. You have defined an 8x2 grid o...

presque 3 ans il y a | 0

| A accepté

Question


How to get sample datasets locally? [Documentation error?]
Now that documentation is offline by default, it seems that the sample datasets mentioned on this documentation page are no long...

presque 3 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
Understanding the following step in MATLAB
The line symbols = randi([0 3], 1, 256) generates random values from the values [0 1 2 3]. Those zero values are not a valid i...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Add data from one matrix to another by the values of one column
C1 = { 1000 [10370;10371;10372] 1001 [12933;12934] 1002 10001 2000 11320 2001 [11347;11348] 2002 [10362;10363] 2003 [1263...

presque 3 ans il y a | 0

Réponse apportée
Standard Deviation for X,Y data over 30 Years
I agree with @dpb's comment. The only other thing I can think of is that the syntax std(A,[],3) which seems to be equivalent t...

presque 3 ans il y a | 0

Réponse apportée
How to use groupsummary to group by hour-of-year
The groupbin option "hour" doesn't do what you want? (If not, can you upload a sample of input and output data indicating what ...

presque 3 ans il y a | 0

Réponse apportée
Linear FillMissing producing incorrect values?
User error (or, really, misinterpretation). Although the result happens to be half, the process is not to just take half of the...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
The best approach to avoid the Kullback–Leibler divergence equal to infinite
Your question is not really a MATLAB question, but a math/stats questions. (At least, it seems you already understand how to rem...

presque 3 ans il y a | 2

Réponse apportée
salve one field in the same struct is possible?
I believe that save('vv','-struct','A','d','-append') will do what you want

presque 3 ans il y a | 1

| A accepté

Réponse apportée
I have a 5x6 matrix. I want to calculate sum of only those values which are consecutive nonzero along each row. How to do that? The desired result given in description box.
I believe this does what you want: % Input a = [2 3 1 4 0 0; 0 0 0 0 0 0; 0 0 1 5 7 0; 0 0 0 0 4 0; 4 ...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How to calculate the date 0.25 years after the date of January 15, 2020
The behavior might not be what you expect, but it is what is documented for the years function: "If X is a numeric array, then ...

presque 3 ans il y a | 0

Réponse apportée
linear vs nonlinear regression model
Whether a model is linear or not refers to the coefficients being solved for (a, b, c), not the data (x, x1, x2).

presque 3 ans il y a | 2

Réponse apportée
How do I make a graph for newton raphson?
I edited your anonymous functions to use element-wise multiplication (.*) instead of matrix multiplication (*). % Newton Raphso...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
NEED HELP, I want to obtain the following array.
Assuming that the answer to @Walter Roberson's question is "the size is always a multiple of 4", then % Make up some input data...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Hello everyone, I have date and time data in an excel separately. That is, year in one column, month in another, day in another column, and time in another column. how can i r
Here is one way: dateTbl = readtable("dateFile.xlsx"); dateData = datetime(dateTbl.Var1,dateTbl.Var2,dateTbl.Var3,dateTbl.Va...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Dimensionality error with plot
I understand your confusion. pressureData(1,1,:) is a vector in the sense that it only has elements along one dimension (the 3rd...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Fit a statistical distribution to truncated data
I haven't used it much, but this File Exchange submission seems to do a pretty good job. pd = makedist('Normal','mu',3); t = t...

presque 3 ans il y a | 2

Réponse apportée
Could anyone give me more information about this vergin of Matlab?
MathWorks releases two versions per year, named (for example) R2022a and R2022b. The most recent release is R2023a. If I have co...

presque 3 ans il y a | 0

Réponse apportée
Why does polyfit gives two outputs?
The first line of the function description on the documentation for polyfit states precisely what those outputs are. They are t...

presque 3 ans il y a | 1

Réponse apportée
Rename folders using folder names saved in cells
Here is one way: cell_numbers = {2;10;22;48}; cell = {'parameter_1';'parameter_2';'parameter_3';'parameter_4'}; % <---- You sh...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How to switch the indexing order
There's probably no way that isn't somewhat awkward, but here is a function that will convert a column-major index (which is wha...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Plot with x-axis limits going from [180:360] then [0:180] contiguously
You only give one example, and this will do what you want for this one example. It does not touch your data, just what is plotte...

presque 3 ans il y a | 0

Réponse apportée
How to extract the X and Y values from a contourf graph
The problem is that you set the levels input to contourf to [1 1], but it is impossible to have contours there, because all your...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Need advice for coding dummyvar vectors - Regression
The documentation for fitglm states "If data is in a table or dataset array tbl, then, by default, fitglm treats all categorica...

presque 3 ans il y a | 0

Réponse apportée
how to determine that all cell array value exists in other cell array?
This does what I think you want: S = {[29 56 62]; [34 40 62]; [48 52 7]}; T = {[1 3 5 7 9 11 13 15 17 19 21 23 ...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
all function B = all(A < 0.5,3)
The reason is that all MATLAB arrays have implied singleton dimension beyond the 2nd dimension, if they have not been actually s...

presque 3 ans il y a | 2

Réponse apportée
Applying a K-Fold cross validated model to predict the response variable for new data
Immediately after writing my comment above (which is still true), I think I see the answer without the additional info. For k-f...

presque 3 ans il y a | 0

Réponse apportée
How can I extract a number in a string before a certain character
str = "Var.[100-200, 4000-5000]"; regexp(str,"\d*(?=-)","match") Matching regular expressions can be a bit inscrutable at fi...

presque 3 ans il y a | 1

Réponse apportée
Generate a cube with length 2*r, then split the cube into 100^3 equally spaced 'little cubes'
Your problem is mathematically equivalent to generating n=500 random numbers from 1:(100^3) numbers, where each number correspon...

presque 3 ans il y a | 1

| A accepté

Charger plus