답변 있음
How I can load multiple data files in workspace?
files = dir('Data*') ; % you are in the folder of data files N = length(files) ; iwant = cell(N,1) ; for i = 1:N iwa...

대략 4년 전 | 0

| 수락됨

답변 있음
How to add sparse matrix to an n*n matrix
To add A and B, they should be of same dimension. In your case A is 4x4 matrix whereas B is not. So to add them, you have to mak...

대략 4년 전 | 0

| 수락됨

답변 있음
Stacking diagonal matrices generated from rows of other matrix
This would be better than given code: C=magic(4) ; D=zeros(3,3,4); for i=1:4 D(:,:,i)=diag(C(i,2:4)); end D = re...

대략 4년 전 | 0

답변 있음
Locate indices of datetime from one table in another?
Read about ismember, ismembertol.

대략 4년 전 | 0

답변 있음
how to save scatter plot of each row as image for image classification
load('saveddata.mat') ; for i = 1:100 plot(fixedclass(i,:),'.') drawnow filename = [num2str(fixedclass(i,1)),'.p...

대략 4년 전 | 0

답변 있음
Number of observations in X and Y disagree.
Your yc i.e. target for the respective input in the line: net1 = trainNetwork(GlucoseReadingsTrain,yc,layers,opts); is of dime...

대략 4년 전 | 0

| 수락됨

답변 있음
How do I do part 2 and 3 here?
Velocity is nothing but dr/dt i.e. slope. So you have used polyfit and you got the slope already.

대략 4년 전 | 1

답변 있음
repeat in the same vector
v = [1 2 3; 4 5 6] ; iwant = repmat(v,1,2)

대략 4년 전 | 0

답변 있음
How to display R, G, B colours of an individual pixel in an image?
MAke/ create the required coordinates/ locations where you want to put text and the use patch, text. Read about patch and text...

대략 4년 전 | 0

답변 있음
Vandermonde-like matrix
p = -(0:0.5:4) ; % power values n = 5 ; % n value ind1 = bsxfun(@plus, (1 : n), (0 : numel(p) - n).'); % make moving win...

대략 4년 전 | 0

| 수락됨

답변 있음
Randomly generate a 10x10 matrix. Using a command string, extract a 5x5 array containing the elements at the bottom right of the original array.
Read about rand and matlab matrix indexing. https://in.mathworks.com/company/newsletters/articles/matrix-indexing-in-matlab.ht...

대략 4년 전 | 1

| 수락됨

답변 있음
The OR statement "|" is not working
You may consider replacing the line roll ~= 2 | 3 | 7 | 11 | 12 with ~ismember(roll,[2 3 7 11 12])

대략 4년 전 | 1

답변 있음
How to pick only one non-zero value from each row of a matrix (iterative output)
A = readmatrix('R_mean_value_0.01.csv'); m = length(A) ; IG = [0, 10, 100, 1000] ; % initial guess n = length(IG) ; nn ...

대략 4년 전 | 0

| 수락됨

답변 있음
How do I make a cell array of doubles with non-uniform dimensions into a matlab array? (substitution of blanks with NaN or Zero)
L = cellfun(@length,output) ; iwant = NaN(length(L),max(L)) ; for i = 1:length(L) iwant(i,1:L(i)) = output{i} ; end Bu...

대략 4년 전 | 1

답변 있음
Converting Numeric Dates in Matlab does not work
table1.Date = datestr(table1.Date) Or table1.Date = datetime(datevec(table1.Date))

대략 4년 전 | 0

| 수락됨

답변 있음
if i have 4x3 matrix all values equal 1 , how to change the diagonals to zeros ?
A = ones(4,3) ; A(1:1+size(A,1):end) = 0

대략 4년 전 | 1

답변 있음
Create STL from patch object or simlar
load('Contours.mat') ; p = [perimeter1 ; perimeter2 ; perimeter3 ; perimeter4 ; perimeter5 ; perimeter6 ; perimeter7 ; perime...

대략 4년 전 | 0

답변 있음
Vertcat with equally sized tables does not work
Try join. table_3 = join(table_1 , table_2)

대략 4년 전 | 0

| 수락됨

답변 있음
when the result of strmatch has no value, then how can I change it to 0?
REad about contains. You may use them. Also have a look on strcmp.

대략 4년 전 | 0

| 수락됨

답변 있음
how would i write script to graph the 't' and 'y' values?
Read about plot function. plot(t,y); xlabel('t') ylabel('y')

대략 4년 전 | 0

답변 있음
How to solve second-degree algebraic equation containing elements of struct arrays?
syms k1 k2 k3 eqn = k1 * cos(ell1.theta)^2 + 2*k2 * cos(ell1.theta)^2 + k3 S = solve(eqn)

대략 4년 전 | 1

| 수락됨

답변 있음
How to split a column with numerical values?
load('data.mat') name = reshape(struct2array(ICCs),3,[])' ; T = array2table(name); Or you can use load('data.mat') T = stru...

대략 4년 전 | 0

답변 있음
'Index exceeds the number of array elements ' why this error is showing?
This line: dydt = [y(4) (-ugdd-(2*r1*w1*y(4))-((w1)^2*y(3)))]; expects y to be 1x4 vector, but your y is 1x2.

대략 4년 전 | 2

답변 있음
How to use subplot in a loop?
for i = 1:9 subplot(3,3,i) end

대략 4년 전 | 0

| 수락됨

답변 있음
How to plot a vector?
Read about quiver x = 0 ; y = 0; u = 0; v = 0 ; quiver(x,y,u,v)

대략 4년 전 | 0

답변 있음
How to combine two exponential equations into one?
And I would like y to be multiplied from row 1-2112 and y2 to be multipled from row 2113-4224 Yes, it is possible. Let dataCorr...

대략 4년 전 | 0

답변 있음
How to add 5% uniformly distributed Noise in the dataset
load('datasetvalue.mat') [rows, columns] = size(dataset); N = zeros(rows,columns) ; % pick 5% of random indices idx = ran...

대략 4년 전 | 0

답변 있음
How to replace value with zero to match the size of array
Let A be your 250x1000 array. B = zeros(size(A)) ; % initialize the zero matrix B(:,1:20) = A(:,1:20) ; % replace first twent...

대략 4년 전 | 0

| 수락됨

답변 있음
How to import kmz file or import a google earth gui in matlab?
https://in.mathworks.com/matlabcentral/fileexchange/12954-google-earth-toolbox

대략 4년 전 | 0

답변 있음
Why i am getting error in the 2nd input line
It looks there is some function in your working directory on the name input. What does which input show up? Rename the functi...

대략 4년 전 | 0

더 보기