Answered
how to give title of the legends?
You can use the legend function.

21 days ago | 0

| accepted

Answered
How to create matrix with Standard deviation from every 5 columns of another matrix?
Here is one way: % Pretend data [Use your actual data instead] M = randn(100,20); % Reshape into the slices needed for stan...

22 days ago | 0

| accepted

Answered
Using Histogram to create a figure with multiple data sets
One possibility would be to use histcounts to get the bin counts (instead of histogram to plot the bins directly), and then a st...

22 days ago | 0

Answered
How to update array inside a database
I don't fully know the answer, but here are a couple thoughts. I highly doubt you need to explore JDBC. If ODBC works for fetch...

24 days ago | 0

Answered
Cost matrix from an array without for loop.
You can use implicit expansion to subtract the two vector from each other, by transposing one of them. cost = abs(domain-domain...

24 days ago | 1

| accepted

Answered
Is there a way to avoid this inaccuracy when converting an string to a double and then to an unsigned int? I have tried using str2num() but get the same result.Thanks!
The reason for this is that MATLAB uses double-precision arithmetic by default, which will typically give approximately 15 decim...

24 days ago | 0

Answered
Extract data from matrices and arrays using vectors of coordinates
Use the sub2ind function to convert the subscripts to a linear index into the matrix. Using your example: A = [1 2 3; 3 4 5; 8...

25 days ago | 1

| accepted

Answered
For loop for correlation - linear indexing
I think you need to use A{:,i} instead of A(:,i) in the call to corrcoef.

25 days ago | 1

| accepted

Answered
Why LDA model generate a topic include stop words although these words don't exist in the data ?
I don't think it is possible to answer this question well without seeing the data. I think it is extraordinarily unlikely that ...

25 days ago | 0

Answered
How to do a gauss partial pivot?
A = [1 2 3; 2 -1 1; 1 1 1] A./abs(max(A,[],2))

26 days ago | 0

| accepted

Answered
Question about sorting an array column by column
choose_data = sort(choose_data) will sort every column independently. Ascending sorting is the default, so you don't need to sp...

26 days ago | 0

Answered
Please explain how does this file work?
Because it does look like MATLAB code, it looks like you could add a .m extension to the file, and run it normally. I'm not sur...

26 days ago | 0

| accepted

Answered
What " *.form='full' " means in making structure??
This is a GAMS question, not a MATLAB question. It looks like this page from the GAMS documentation discussing the form field. ...

26 days ago | 0

| accepted

Answered
Error in line for CVX
I don't know CVX, but the error message seems straightforward. My best guess is that m is a variable of type cvx, and you are tr...

26 days ago | 0

Answered
How to change variable value for every iteration in a for loop?
for na = 1:length(a) for n=1:length(x) %Coefficient of Lift at each panel l(n) = f(n).*(a(na))-((z(n)).*(...

26 days ago | 0

Answered
How to plot specific values from a matrix of 10*10
M = [0 1 0 2; 0 2 0 3; 0 3 0 4]; colsToPlot = not(all(M==0)); figure plot(M(:,colsToPlot))

26 days ago | 0

Answered
How to set a column vector as a legend name within multiple plots?
Don't take the transpose: legend(strcat('Alpha=',num2str(a1)))

27 days ago | 0

| accepted

Answered
Index exceeds the number of array elements (1).
When you make this assignment: T_o=10+15.*sin((Hour-9).*(pi/12)); it looks like T_o is a scalar (i.e. length 1), but then you ...

27 days ago | 0

| accepted

Answered
Feature request for postgres support
At least for the first two features, can't you just execute them directly as SQL statements?

27 days ago | 0

Answered
Need to delete outliers by seeing the plot
data = data(data>-4);

28 days ago | 0

| accepted

Answered
how to read mixed date and data
I would try the readtable function. You can specify the input formating if needed.

28 days ago | 0

Answered
How can I get multiple plots on one graph, not overlapping?
What an ugly and potentially confusing plotting style. Too bad you are being coerced into doing it that way. One way to do this...

28 days ago | 0

| accepted

Answered
How to convert string to double array in table
% My best guess at your data A = {'[28.346853874154966, 284.04836936606813, 57.820072802912115, 64.72700622938805]'; '[16.5200...

29 days ago | 0

| accepted

Answered
How can I create a Poll in a community
I am as certain as I can be that only MathWorks staff can create such a poll.

29 days ago | 0

| accepted

Answered
How to delete specific cells according to the condition from cell array?
This line of code will identify the cell locations that have a 7x4 array, having those two elements equal: deleteIdx = cellfun(...

29 days ago | 1

| accepted

Answered
Is there a way to set the color tag attribute in macOS with MATLAB?
Yes, it is possible. Here is the github repo of a command line tool that will manipulate tags. You can call that command line ...

29 days ago | 1

| accepted

Answered
How can I get data from evaluating a function, say y=x^2+5 and put it in table?
x = linspace(0.1,0.9,50); y = x.^2+5; tbl = table(y.');

30 days ago | 1

| accepted

Answered
Linear regression fit model for Multi-variant responses
I think you need mvregress.

1 month ago | 0

Answered
Plotting data against time
New answer based on your update. The problem is that your original time series is in two different formats -- not including the...

1 month ago | 0

| accepted

Answered
Plotting data against time
Works for me, when I correctly specify valid dates using the input format. I'm guessing that your datetime is somehow messed up...

1 month ago | 0

Load more