Réponse apportée
How can I modify a list of existing variables programmatically?
You've seen @Walter Roberson's answer, and it is spot-on. That being said, what you want to do is possible, using the appropriat...

plus de 2 ans il y a | 1

Réponse apportée
Get exact curve parameters in the fit function
The four decimal places are just the default display value. You can change that with the format command. For example, use format...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
If statement not working for trig quad check
I did not look in detail, but I'd be willing to bet that the problem lies in making comparisons between floating-point numbers, ...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Mathematical functions across variables
If you just want to know their sum A(1,1) + B(2,1) If you want to add A(1,1) to the value stored in B(2,1) B(2,1) = A(1,1) + ...

plus de 2 ans il y a | 0

Réponse apportée
Plot ECDF and histogramm of distribution
Do you mean you want to avoid drawing the additional horizontal red lines? I think you'll need to do something "manually", beca...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Are "fitrnet" and "fitnet" using backpropagation?
I am not an expert, but my read of the documentation is that all the algorithms used by fitnet, at least, will use backpropagati...

plus de 2 ans il y a | 1

Réponse apportée
How to update leap seconds
The file leapseconds.m calls a built-in file to get the list of leap seconds, but you can edit that file to add additional ones....

plus de 2 ans il y a | 0

Réponse apportée
Random number generate in an interval
A normal distribution, by definition, has support from negative infinity to positive infinity. You cannot have both a normal dis...

plus de 2 ans il y a | 0

Réponse apportée
I can not solve the errors
The direct cause of the error you are seeing is that in the line that gives the error, you are trying to matrix-multiply a 1x3 v...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Error Code: Unable to perform assignment because the left and right sides have a different number of elements
My best guess is that while your t and v have the same number of elements (which would allow plotting them against each other), ...

plus de 2 ans il y a | 0

Réponse apportée
Sorting columns by header names
% Make up a data table N = 3; Column_B_data1 = rand(N,1); Column_A_data1 = rand(N,1); Column_C_data2 = rand(N,1); Column_D_...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
Horzcat Error in 3x3 matrix with multiplication of Matrices
There is nothing inherently wrong with the matrix you specified (as you can see from the code below). You'll need to share more...

plus de 2 ans il y a | 0

Réponse apportée
Need help in using trapz to integrate a definite function
trapz is probably not the best way to do this. You could use integral instead c=3*10^8; % speed of light in vaccum h=6.626*10....

plus de 2 ans il y a | 1

Réponse apportée
Need help in using trapz to integrate a definite function
Did you read the documentation for the trapz function? It expects either two or three inputs, not the four you provided. I am g...

plus de 2 ans il y a | 0

Réponse apportée
Break title into multiple lines?
You can create a multiline tile using either a cell array or a string array. Each element in the array corresponds to a separate...

plus de 2 ans il y a | 115

| A accepté

Réponse apportée
Fitting 3-d plot
Use meshgrid to make a grid out of your x and y vectors: x = 1:8; y = 1:11; z = rand(11,8); [xx,yy] = meshgrid(x,y); su...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Slider (legacy) with no room to slide?
I believe this does what you want, for N=1. I frankly have not fully grokked how this works, but figured I'd post the solution ...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Numbers prediction using advanced matlab code
The fact that you do not reproduce the same output every time is probably because the algorithm you are using has some random co...

plus de 2 ans il y a | 0

Réponse apportée
Is there a way to use a for loop to loop through structure fields?
Yes, you can. (Here, I just check the size, instead of calling a function.) mystruct.field1 = rand(2,3,5,7); mystruct.field2 =...

plus de 2 ans il y a | 1

Réponse apportée
How to obtain an array of the indices from the original array when using nchoosek
I have to admit I am not absolutely certain about what you want as input and output. Here is my best guess: A = [7, 8, 9]; C =...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
How do I fit two function in a same data at a time depending on the range ?
Here is a solution in which I fit the non-linear function (of the form you prescribe) to the data. (For fun, I added some stati...

presque 3 ans il y a | 0

Réponse apportée
How do I fit two function in a same data at a time depending on the range ?
If the data are truly smooth, as what you posted (and does not have statistical fluctuation), then you just need to find the fir...

presque 3 ans il y a | 0

Réponse apportée
transform bar chart with separate bars (for each value of y) to bar chart with overlapping bars
load matrix M = matrix(:,2:end); [sortedM,sortingIndex] = sort(M,2); cm = [[1,0,0]; [0,0,1]; [0,1,0]; [1,0,0.52]]; fi...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How to incorporate likelihood component in posterior estimation?
I am not experienced using these models, but based on the workflow described in this documentation, I think you just need to use...

presque 3 ans il y a | 0

Réponse apportée
In the operation of filtfilt, does the filtering process occur in the row direction or the column direction?
Per the documentation page filtfilt ... "The function operates along the first array dimension of x unless x is a row vector. I...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
3D plot origin shifting
By default, the axes will go from smaller to larger number, starting from the point "nearest" you, moving "away". It seems like ...

presque 3 ans il y a | 0

Réponse apportée
How to shape the subplot to square and change colorbar label to top of the bar?
One way is to add axis square after each imagesc call: set(0,'DefaultAxesFontName','TimesNewRoman'); set(0,'DefaultAxesFontSiz...

presque 3 ans il y a | 0

Réponse apportée
Creating vector for parametrizing ANN
You should be able to use the fullfact function to do this. I am not exactly certain about the final result you want, but here ...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
What is the difference between the 'basis' and 'DiscountBasis' in Function 'bndtotalreturn'
That's a finance question, not a MATLAB question. Here is simplest (but I think correct) explanation I can come up with: Basis...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
numerical oddity with decimal multiplication
Possibly the most "popular" question on this forum. Read the Accuracy of Floating-Point Data section of the Floating-Point Numbe...

presque 3 ans il y a | 2

Charger plus