Answered
how to adjust bar width (absolute value)?
I would point out that in one sense, your bars are the same width -- they both extend one unit (e.g. from 1.5 to 2.5). The reaso...

9 días ago | 0

| accepted

Answered
Arrow of a vector ( r, theta) from a point (x,y).
You can make an arrow on a plot using the annotation function, or you may want to use a quiver plot if you want the arrow to com...

9 días ago | 1

Answered
How to find all possible combinations between the numbers of two vectors where order does matter
I expect there is a more efficient way, but I think this will do what you want. a = [1 2 3 4]; b = [2 4]; c = unique([combv...

9 días ago | 0

| accepted

Answered
Why this code the given error?
CVX is a third-party MATLAB toolbox (i.e. not from MathWorks), that you need to install according to their instructions. You nee...

10 días ago | 0

| accepted

Answered
How can I read specific data from excel with multiple sheets?
My first choice for reading data from Excel is usually the readtable function. It has many options for pulling data from individ...

12 días ago | 0

| accepted

Answered
How to Normalize a Histogram without using fitdist and pdf or any other fitting functions?
Use the 'Normalization' Name-Value pair to the histogram function: x_values = 0:0.01:5; xx_values = 0:0.01:5; data1 = load('3...

12 días ago | 0

| accepted

Answered
Why LSTM training is not done properly?
I doubt that it is actually the size of the data that is the problem. You could test that idea by running the second year (whic...

13 días ago | 0

Answered
Check if a script has been run during this session
Your command history is stored in an XML file, in your preferences directory. See this question/answer for details.

14 días ago | 1

| accepted

Answered
Creating 2 new arrays for given condition
keepIndex = y>0.0004; y_new = y(keepIndex); tTrans_new = tTrans(keepIndex)

14 días ago | 1

| accepted

Answered
How can I create this kind of graph?
Take a look at the MATLAB Plot Gallery. You will find charts of those styles, and you can grab the code that was used to create ...

14 días ago | 0

Answered
How to change resolution to every other point?
res = 2; pcolor(xgrid(1:res:end,1:res:end),ygrid(1:res:end,1:res:end),z(1:res:end,1:res:end)) will only plot every other po...

15 días ago | 0

| accepted

Answered
plotting a variable size of dataset
Instead of naming your variables dynamically, which is almost always a bad idea, store your data in cell arrays. Then the length...

17 días ago | 1

| accepted

Answered
My Matlab code for 1D convection Diffusion problem is taking too much time to execute
You set the values tolearnce=1e-7; error=1; before you enter the while loop, and you never change them. Therefore, the loop w...

17 días ago | 0

Answered
Insert degree symbol in axis title.
The degree symbol is ASCII character 176. So, here is a simple way: % Plot some random data plot(rand(100,1),rand(100,1),'.') ...

17 días ago | 0

| accepted

Answered
If I suppress an error, will the error still be suppress if I open the file on another computer?
Errors cannot be suppressed. If you mean supressing a warning, then I would expect that the best way to ensure the warning is su...

19 días ago | 0

Answered
I want find the reason for this error message.
In the outermost call to fl in this line e1=fl(fl(d1+fl(sqrt(fl(fl(b1,3)-fl(fl(4*a1,3)*c1,3),3)),3))) you are calling with onl...

20 días ago | 0

| accepted

Answered
how to use function handles
I think the basic idea you need is f1 = @(x) x; f2 = @(x) x.^2; f = @(a,x) (a~=0)*f1(x) + (a==0)*f2(x); f(0,2) f(1,2)

20 días ago | 2

Answered
How to remove indexed set of rows from a cell array
% Identify rows row_indices = find(cell2mat(corb(:,1))>100000 & cell2mat(corb(:,1))<300000); % Define new array that is the...

21 días ago | 0

Answered
Plotting for various values of the same parameter on the same plot
% Some data x = 1:10; % Create the figure window, use the hold command % to prevent overwriting of axes figure hold on ...

21 días ago | 0

Answered
How do I plot the following graph in Matlab?
One possible solution in this case is to call Python from MATLAB, rather than figuring out how to recreate their plots. Since th...

21 días ago | 1

Answered
How to use fprintf with two arrays?
Assuming that X and Y are variables in your workspace, you need fprintf(fileID,'%1d %2d\n',X,Y); rather than fprintf(fileID,'...

22 días ago | 1

| accepted

Answered
For Loop - need to iterate values at the same time.
Even easier: for x = 1:10 fname = sprintf('D:\\Michael Files\\Data\\Run %05d\\Ascii\\Xxsv00001 %03dX.txt',x,x+266); d...

22 días ago | 2

Answered
The result of the operation in the calculator and the result of the operation in matlab are different
I don't know what you did on your calculator, but it was wrong. The MATLAB result is correct, and I also double-checked this on ...

22 días ago | 2

Answered
removing specific rows from char array
data=['01'; '02'; '03'; '04'; '05'; '06'; '07'; '08'; '09'; '10']; data([1 5],:) = []

22 días ago | 0

| accepted

Answered
How to compute the standard deviation of each column in a matrix?
If A is your array, then s = std(A) is a row vector, where each element is the standard deviation of the corresponding column....

23 días ago | 0

Answered
Subdividing a matrix and pairing specific columns in the subdivisions
You should strongly reconsider whether you need dynamically named variables, because it is usually a terrible idea. Instead, con...

23 días ago | 0

Answered
How to create a new column based on values of current column
I believe this does what you want, assuming each value only appears once in the array, and you know the order they appear. You c...

23 días ago | 0

| accepted

Answered
Is version 2021a compatible with windows 10 home (version 21h1)?
Yes. You can see the system requirements here.

23 días ago | 0

Answered
how I can make the matrix?
I think this does what you want. (It produces the correct output for your example.) If not, I hope you can understand and adjus...

23 días ago | 0

Answered
Remove "data1" & "data2" recession plot legend
The simplest is probably to just wait until all the plots are created before adding the legend. v = datevec({'31-Jan-2000','31-...

24 días ago | 0

| accepted

Load more