Answered
How do I create a vector by repeating a vector
A = [1; 2] ; B = repmat(A,2,1)

5 dagen ago | 1

Answered
Saving Table in Excel while in loop
Loop is not needed, you can striaght away write the matrix into excel. writematrix(AllMI,'test.xlsx');

5 dagen ago | 0

| accepted

Answered
How to save output images after preprocessing into new folder sequentially without overwriting?
infolder = '' % give the path of the folder where your RGB images are present outfolder = '' % give the path of the folder...

5 dagen ago | 0

| accepted

Answered
Invalid Training data. The Output size of the last layer does not match the reponse size
This is due to number of filters at Final-convolution layer. DEfault it has number of filters as 2, you need to change it to 1. ...

5 dagen ago | 0

| accepted

Answered
Help with symbolic substitution
Why don't you use anonymous function ? zz = @(x) (x(1) + x(2) + x(3))^2/(x(1)^2 + x(1)*x(2) + x(1)*x(3)) ; % Generate a rando...

6 dagen ago | 0

Answered
Compare elements of an array with all elements in a matrix
No loop needed. You can use straight away like shown: P = randn(18,10); C = randn(1,10); C1 = repmat(C,18,1) ; idx = C1 >...

6 dagen ago | 0

| accepted

Answered
Reading and Processing Many Text Files
txtFiles = dir('*.txt') ; N = length(txtFiles) ; for i = 1:N thisFile = txtFiles(i).name ; fid1 = fopen(thisFile)...

6 dagen ago | 0

Answered
Variable out_vec must be of size [1 3]. It is currently of size [1 20]. Check where the variable is assigned a value.
x = 1:20 ; idx = sort(randperm(length(x),3)) ; % select randomly x(idx)

6 dagen ago | 0

Answered
Accessing elements in a structure
file = dir('*.mat'); %fine all the .mat files num_files = length(file); %record how many files have been found [~, index] = na...

6 dagen ago | 0

| accepted

Answered
Fit data to array values
x = 1:5 ; y = [0.987,0.95,1.06,1.02,1.04] ; p = polyfit(x,y,2) ; yi = polyval(p,x) ; figure hold on plot(x,y,'.r') pl...

6 dagen ago | 0

Answered
How to avoid scientific notation in tables?
REad about format format long

6 dagen ago | 0

Answered
keep getting Index exceeds matrix dimensions.
The error is clear.....you are trying to extract more number of elements than present from an array. EXample: A = rand(1,5) ;...

6 dagen ago | 0

Answered
To find Maximum value and minimum value for each group of four rows for a 180*1 matrix
A = rand(180,1) ; B = reshape(A,12,[])' ; themax = max(B) ; themin = min(B) ;

6 dagen ago | 0

| accepted

Answered
How to generate a matrix of random decimal values from -1 to 1?
format long A = single(rand(3)) ; fmt = [repmat(' %0.6f',1,3),'\n']; fprintf(fmt,A)

6 dagen ago | 0

Answered
adding data to a cell array without loosing the order
idx = 1:24000; id = reshape(idx,5,[])' ; [m,n] = size(id) ; C = cell(m,n) ; for i = 1:m for j = 1:n C{i,j} =...

6 dagen ago | 0

| accepted

Answered
given two matrices find the indices of B in A
Read about ismember, in there you can specify the option of rows. https://in.mathworks.com/help/matlab/ref/double.ismember.htm...

6 dagen ago | 0

Answered
Getting an array of points along an arc
clc; clear all ; figure; a = [124.0102 62.2260]; b = [33.3602 77.9434]; r=250; syms x y [x,y]=solve((x-a(1))^2+(y-a(2)...

6 dagen ago | 0

| accepted

Answered
How to scatter3 row vector with different colors
LEt A be your 3*510 matrix. x = A(1,:) ; y = A(2,:) ; z = A(3,:) ; scatter(x,y,10,z,'.'); If you want to use scatter3. ...

6 dagen ago | 0

Answered
combined Filled area and contour plotting
Refer here: https://in.mathworks.com/matlabcentral/answers/412639-creating-surface-plot-from-a-matrix-with-3-columns

6 dagen ago | 0

Answered
Change the value in multiple text file?
You need not to take a loop, you can straight away use the logical indexing. ZEE=xlsread('zee.xlsx','Area','B2:MP138'); ZEE=Z...

7 dagen ago | 0

Answered
Generate training progress plot from saved trained model
[testnet,traininfo] = trainNetwork(augimdsTrain,lgraph,options); save('data.mat','testnet','traininfo') traininfo has the deta...

7 dagen ago | 0

| accepted

Answered
Is it possible to create a road at once in shp file data?
S = shaperead(filename) ; P = [[S(:).X]' [S(:).Y]'] ; plot(P(:,1),P(:,2))

7 dagen ago | 0

Answered
Creating hourly average data with geographic coordinates to produce 3D matrix
T = readtable('New Text document.txt') ; t = T.hour ; lon = T.lon ; lat = T.lat ; temp = T.temp ; [c,ia,ib] = uniqu...

7 dagen ago | 0

Answered
how to plot by varying initial conditions
function myfun() %plot n vs x n vs y R = cell(10,1) ; figure hold on for n=1:10 [t,r]=ode45(@fn,[0 140],[0.01+n 0.01 ]) ;...

8 dagen ago | 0

Answered
scatter3 color projection
clc; clear all ; load('test_data.mat') x=test(:,1); y=test(:,2); z=test(:,3); figure scatter(x,y,1000,z,'s','filled'); ...

8 dagen ago | 0

| accepted

Answered
How to make scatter
Fit striaght line to the given data using polyfit. Plot the line using plot function. Use hold on Plot the given data using ...

9 dagen ago | 1

Answered
2D Colored Plot
You can get the indices of the required values and plot them with different colors. x = 0:.05:2*pi; y = sin(x); figure hold...

9 dagen ago | 1

Answered
How to search closest coordinate values in a Lat Long Z data
Read about knnsearch. https://in.mathworks.com/help/stats/knnsearch.html

10 dagen ago | 0

Answered
How to set specific colors in horizontal error bars?
h = herrorbar(x,y,z) ; Check the handle h, it has options to change color. You may play around with that. Like: h(1).Color =...

10 dagen ago | 0

| accepted

Answered
how to solve the error "Unable to perform assignment because the indices on the left side are not compatible with the size of the right side"
The error is clear, this error pops out when you are trying to save more number of elements than the initialized array. Exampl...

10 dagen ago | 0

Load more