Answered
how to crop a size of 25x20 from a image if centre coordinates are known
Let (x,y) be your center pixl locations. iwant = imcrop(I,[x-10 y-10 20 20]) ;

ongeveer 2 maanden ago | 0

Answered
How to plote the stress for each element in the mesh with a color map.
Refer this: https://in.mathworks.com/matlabcentral/fileexchange/32719-postprocessing-in-fem

ongeveer 2 maanden ago | 0

Answered
How to plot this type of function?
t = linspace(-5,5) ; x = exp(t) ; y = 1-exp(-t) ; z = atan2(y,x) ; plot(t,z)

ongeveer 2 maanden ago | 0

Answered
different outputs for same input in every run
%%%%%%%%% rng(1) find_kmeans=kmeans(data(:,1),2); data_2=table(data(:,1),find_kmeans(:)); data_2.Properties.VariableNa...

ongeveer 2 maanden ago | 0

| accepted

Answered
Need help in plotting current and conductance
You need to initialize the arrays before loop for speed and to store the values into an array. NOTE: Check the last values of ...

ongeveer 2 maanden ago | 1

| accepted

Answered
choose the limit of two y axes
x = linspace(0,25); y = sin(x/2); yyaxis left ; plot(x,y,'k'); ax(1) = gca ; r = x.^2/2; yyaxis right plot(x,r); ax(2)...

ongeveer 2 maanden ago | 1

Answered
Can somebody assist me with the Mathlab source code to plot 9x9 grids and place sensors in each grid?
x = 1:9 ; y = 1:9 ; [X,Y] = meshgrid(x,y) ; figure hold on plot(X,Y,'r',X',Y','r',X,Y,'.k')

ongeveer 2 maanden ago | 0

Answered
How do I insert a 1x1 cell array consisting of one vector into a table?
coordinates = [2,2,2,2,2]'; % single row vector T = table(coordinates)

ongeveer 2 maanden ago | 0

Answered
locally weighted least square regresion
t = linspace(0,2*pi) ; y = sin(t) ; p = polyfit(t,y,3) ; xi = linspace(t(1),t(end)) ; yi = polyval(p,xi) ; plot(t,y,'r',xi,...

ongeveer 2 maanden ago | 0

Answered
if condition picking certain day of week
thedates = (datetime(2022,01,1):datetime(2022,1,31))'; d = day(thedates,'name') ; idx = ismember(d,{'Monday','Thursday'}) ; d...

ongeveer 2 maanden ago | 1

Answered
Randomly shuffle folder of images and save it
imgFiles = dir('*.jpg') ; N = length(imgFiles) ; n = randsample(1:10,N) ; % you can out your limits here for i = N I...

ongeveer 2 maanden ago | 1

| accepted

Answered
switch case not recognizing input
user_input=input('Enter the mineral name: ') ; switch user_input case 'magnetite' fprintf('Mineral:Magnetite \n ...

ongeveer 2 maanden ago | 0

| accepted

Answered
How to concatenate multiple .mat files and generate a 3D matrix?
matFiles = dir('*.mat') ; N = length(matFiles) ; iwant = zeros(3048,43,N) ; for i = 1:N S = matfile(matFiles(i).name) ...

ongeveer 2 maanden ago | 0

Answered
without writing any data, I want to create blank excel file.
T = table ; % create empty table fname = 'test.xlsx' ; % here you can give path as well writetable(T,fname) ; % create ...

ongeveer 2 maanden ago | 0

| accepted

Answered
Read multiple excel files
xlFiles = dir('*.xlsx') ; N = length(xlFiles) ; for i = 1:N thisFile = xlFiles(i).name ; T = readtable(thisFile) ; ...

ongeveer 2 maanden ago | 0

| accepted

Answered
3D plot of Latitude, Longitude and Depth while the colour of the points represent earthquake magnitude
scatter3(long,lat,Depth,[],Depth,'filled')

ongeveer 2 maanden ago | 0

| accepted

Answered
Computing the determinant of a block matrix
A = rand(2) ; B = rand(2) ; C = rand(2) ; D = rand(2) ; M = [A B; C D] ; det(M) det(A)*det(D-C*inv(A)*B) In your case, D...

ongeveer 2 maanden ago | 1

| accepted

Answered
find elemets of matrix based on logical conditions
points=readtable('points.txt'); points=table2array(points); x_p=points(:,1); y_p=points(:,2); z_p=points(:,3); t_p=points...

ongeveer 2 maanden ago | 0

| accepted

Answered
Find Gaussian fitting of image data set
Read about pdist.

ongeveer 2 maanden ago | 0

| accepted

Answered
Fitting bimodal wind data using Weibull mixture in matlab
REad about fitdist

2 maanden ago | 0

| accepted

Answered
write data into a file line by line inside foef(fid) loop
I would first read the complete file and then run loop for each line. T = readtable('https://in.mathworks.com/matlabcentral/an...

2 maanden ago | 0

Answered
How to use string with different sizes as a text in figure?
str1 = 'I' ; str2 = 'Love' ; str3 = 'MATLAB' ; str = sprintf('%s\n%s\n%s',str1,str2,str3); [X,Y,Z] = peaks(50) ; pcolor(X...

2 maanden ago | 0

| accepted

Answered
Precipitation plot for a specific time
If you want it for all latitudes at a given time, then you have to fix one longitude. You can extract at a given time, at a fixe...

2 maanden ago | 0

| accepted

Answered
Saving the average in each iteration of a for loop
T = readtable(myfile) ; data = table2array(T) ; avgthic = mean(data,2,'omitnan')

2 maanden ago | 0

Answered
how to plot k-means output
Read about gscatter

2 maanden ago | 0

| accepted

Answered
Draw multiple circles in one image
R = 2:2:10 ; th = linspace(0,2*pi) ; figure hold on for i = 1:length(R) x = R(i)*cos(th) ; y = R(i)*sin(th) ; ...

2 maanden ago | 0

| accepted

Answered
Grouping or categorizing data based on conditions
How about this? data = readtable ('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1078835/Outpu.txt'); data = ...

2 maanden ago | 1

Answered
How to read several files
files_mat = dir('*.mat'); % your pwd is where mat files are present if not give path N_file=length(files_mat); % total numbe...

2 maanden ago | 0

Answered
Error using mesh Z must be a matrix, not a scalar or vector. Error in untitled6 (line 5) mesh(W,Y,Z)
As you have given single value of Z, it would be a line. w = 200:50:450; y=repmat(180,1,length(w)); [W,Y] = meshgrid(w,y); Z...

2 maanden ago | 0

| accepted

Answered
Sum structures with an array 1x1 each one
Q.O20 = 1; Q.B3 = 2 ; Q0h = Q.B3 + Q.O20 s = sum(cell2mat(struct2cell(Q)))

2 maanden ago | 0

| accepted

Load more