Réponse apportée
plot textdata with NaN
Read about readtable. T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1002155/owid-covid-data_202...

presque 4 ans il y a | 0

Réponse apportée
Performing calculations for specific values in a table defined by certain values from another column (Date)
Let T be your table. [c,ia,ib] = unique(T.Date) ; N = length(c) ; theduration = duration(nan(N,3)) ; for i = 1:N Ex...

presque 4 ans il y a | 1

| A accepté

Réponse apportée
Convert daily data to monthly data with missing values.
You can fill the missing values using fillmissing. You can resample the data using retime

presque 4 ans il y a | 0

| A accepté

Réponse apportée
Histogram Not Plotting Correctly
n = 100; x = zeros(1,n) ; for k = 1:n x(k) = randi(5) ; end hist(x,10) Loop is not required. n = 100; x = randi(5,1,...

presque 4 ans il y a | 0

Réponse apportée
Error using legend (line 263) Element 1 is not a string scalar or character array. All elements of cell input must be string scalars or character arrays.
There is a problem in creating the legend string. I have modififed the code, now error is rectified. But your code is messy. You...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.
The error is simple, you are trying to save wrong number of elements then the LHS is intialized for. A = zeros(5,5) ; % A is ...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
How to plot 2D location vs corresponding data in MATLAB
REad abour kmeans T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/999455/MATLAB.xlsx') x = T.(1) ...

presque 4 ans il y a | 0

Réponse apportée
Error in T12 (line 35) surf(X, Y, fplot) and I have no idea what I was wrong
clc clear close all syms x y f = @(x,y)(x.^2+y.^2+x.*y-12*log(x)-10*log(y)); fx = diff(f,x); fy = diff(f,y); [xc,yc] = so...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
Too many input arguments using square
Code is working fine. It seems you have introduced a variable named square. Clear it and then run the function. REad about clear...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
How to calculate inverse of 3d array matrices with size 3*3*18 ?
A = rand(3,3,18) ; [m,n,p] = size(A) ; B = zeros(m,n,p) ; for i = 1:p B(:,:,i) = inv(A(:,:,i)) ; end

presque 4 ans il y a | 0

| A accepté

Réponse apportée
plot 2D array using imagesc ?
REad about subplot

presque 4 ans il y a | 0

| A accepté

Réponse apportée
How can I filter an entire row using a date?
You have varities of cunction to do that. Cnvert the required datetime column into class datetime. This class has the informatio...

presque 4 ans il y a | 0

Réponse apportée
plot gridded data only inside shapefile
Read about inpolygon.

presque 4 ans il y a | 0

Réponse apportée
Draw 3D elliptic cylinder with given parameters
You may proceed like this: a = 4.5368 ; b = 5.6885 ; C = [0.5351, -5.2359] ; L = 21.98 ; u = linspace(0,2*pi) ; v = lins...

presque 4 ans il y a | 1

Réponse apportée
Merge rows based on conditions in the coulmns
data = importdata('dmp.txt') ; [c,ia,ib]= unique(data(:,[1 end]),'rows','stable') ; N = length(c) ; iwant = cell(N,1) ; f...

presque 4 ans il y a | 0

Réponse apportée
Apply a color map to a 2d line
Read about patch x = linspace(1,10,15); y = sin(x); y(end) = NaN; c = y; figure patch(x,y,c,'EdgeColor','interp'); colo...

presque 4 ans il y a | 1

| A accepté

Réponse apportée
What do I have to do if I want to derivative and continue multiplying?
A = [1 2;3 4;5 6]; B = [7 8;9 10;11 12]; D = A'*gradient(B)

presque 4 ans il y a | 0

Réponse apportée
Write a function with input .xls file to read
To load the excel data into matlab use readtable To compare values you can use isequal, ==, etc.

presque 4 ans il y a | 0

| A accepté

Réponse apportée
How can I convert surface plot into STL format file?
[X,Y,Z] = peaks(100) ; surf2stl('test.stl',X,Y,Z)

presque 4 ans il y a | 0

Réponse apportée
How can I represent points and lines in 3 dimensions?
It is in 3D, you need to change the view. view(3)

presque 4 ans il y a | 1

Réponse apportée
How to visualize a table in a color dot plot?
Let A be your matrix. [m,n] = size(A) ; [X,Y] = meshgrid(1:m,1:n) ; figure hold on plot(X(A<0),Y(A<0),'.b') plot(X(A>...

presque 4 ans il y a | 2

| A accepté

Réponse apportée
How to convert a Year Month and Date to Day Number?
Load the data from csv file into MATLAB using readtable You can convert the dates into date numbers using datenum

presque 4 ans il y a | 0

| A accepté

Réponse apportée
How to get column values using indexes
LEt A be your matrix. C5 = A(:,5); % 5th column M1 = A(C5==1,1:4) ; M2 = A(C5==2,1:4) ;

presque 4 ans il y a | 0

Réponse apportée
How to plug in and solve for algebraic equation?
t = linspace(0,1) ; z = 15*(1+(4.1*0.064)/1000*(15/150)^(2/3)*t.^(5/3)).^(-3/2) ; plot(t,z)

presque 4 ans il y a | 0

Réponse apportée
How can I implement KNN ? I want to have user input and data from excel sheet compared.
Say it loudly today that your function is knnsearch. weight = [971; 1401; 105; 210] ; age = [15; 30 ; 25 ; 67] ; data = t...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
How can I detect the centroid or center of segmentation image ?
Read about regionprops

presque 4 ans il y a | 0

| A accepté

Réponse apportée
creating a three-dimensional array from three array with different size
a = rand(1,8) ; b = rand(1,7) ; c = rand(1,6) ; iwant = cell(3,1) ; iwant{1} = a ; iwant{2} = b ; iwant{3} = c ; iwa...

presque 4 ans il y a | 1

| A accepté

Réponse apportée
I want to loop for files in workspace
s = whos ; for i = 1:length(s) s(i).size end

presque 4 ans il y a | 0

Réponse apportée
How to solve this error?
The error is clear. It seems you have an array of size 1x17 and you are trying to extract elements more than present in it. % ...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
Vectors must be the same length
p1=plot (Distanz(i,:) , [Z(i,:) ; HQextrem(i,:); HQ5000(i,:); HQ10000(i,:)]);

presque 4 ans il y a | 0

| A accepté

Charger plus