Create x and y coordinates with available values
cor_xy=[randi(20),randi(30)]

7 months ago | 0

| accepted

get 2 set of random coordinates
x=0:20; % Or any Random Data y=0:30; % Or any Random Data cor_data=[x(randi(length(x))),y(randi(length(y)))]

7 months ago | 0

| accepted

White Noise generator same signal every time I run the simulation
Jurt use the rand function & add to the original signal data signalData= noiseData=rand(1,length(signalData)); signalNoise=si...

7 months ago | 0

I have matrix K and Z
Another way: K = {[12, 50, 15, 99, 61, 74 ,71];[54, 23, 14, 13, 16, 89,67];[12, 45, 78, 90, 12, 56, 16]}; Z = {[ 0, 1, 0, 0, 0...

7 months ago | 0

how to batch save and load loop variable
#Cell Array cell a=cell(1,3); for i = 1:3 a{i}=rand(1,10) end Once strore in the cell array, you can do/access data in ...

8 months ago | 0

I have 3 SST plots which I wish to put side-by-side in 1 figure in the form of a 1x3 panel. How do I go about this? I have attached my plots and the code.

8 months ago | 1

| accepted

Quiver Plot over Binary map
im = imread('Genova_Binary.tif'); [x,y] = meshgrid(-2:.2:2,-1:.15:1); z = x .* exp(-x.^2 - y.^2); [px,py] = gradient(z,.2,.15)...

8 months ago | 0

Some basic MATLAB questions
Hint: rand https://in.mathworks.com/help/matlab/ref/rand.html

8 months ago | 0

Have implemented for loop corectly in my code?
I don't think, is there any loop needed, it can be avoided, just define the following parameters s1=.. s2=.. g1=.. g2=.. Eo...

9 months ago | 0

| accepted

i want a good syntax form
Using loop: Is that OK? data_cell=cell(..,..) %Preallocate Memory iter=1:3:size(s,1); for i=1:3:6 data_cell{i}=s(i,:)*Qb...

9 months ago | 0

How to mark a point on scatter plot obtained using gscatter?
Yes you can specify that, see my example (Just for understanding) x=randi(100,[1,50]); y=randi(100,[1,50]); gscatter(x,y); ...

9 months ago | 1

| accepted

Reason may be: this function is Introduced in R2020b Matlab Version readstruct Its works Matlab 2020b & later version only. ...

9 months ago | 0

| accepted

why get this message "Array indices must be positive integers or logical values." i for loop?
Yes, Matlab allows indexing for positive integer only x=zeros(1,600); for i = 1:600 iNext=i + 1; x(iNext)=x(i) ...

9 months ago | 1

How I change the name of the variables in a table?
Just load the table, for example - var1=[1:10]'; var2=[11:20]'; T=table(var1,var2) % Change the Var names T_new=renamevars...

9 months ago | 0

Why is it giving this error?
As the error, it seems V has more than 2 dimensions, please try pagectranspose pagectranspose if your requirement is fulfille...

9 months ago | 0

How do I divide a row vector (1X3) by normalized scalar?
How do I divide a row vector (1X3) by normalized scalar? You can divide it element wise. Example: >> vec=1:10 vec = 1 ...

9 months ago | 0

| accepted

Index exceeds number of array elements
I didnot find any coding syntax error, but code improvement is required. r1=17.6e-2; % inner radius of sphere, m r2=23.6e-2;...

10 months ago | 0

The dither operation based on the following work: Floyd-Steinberg's error diffusion dither algorithm Floyd, R. W., and L. Ste...

10 months ago | 1

I need the value of a changing variable at a specific value
The value is Cl_val=Cl(find(LDR==max(LDR)))

10 months ago | 0

find the coefficients a, b, and c of the quadratic polynomial. that passes through the three points (x, y)
Sufficients Hints: As it is the part of your work, please check the hints below, the equation is y = ax^2+ bx + c with three g...

10 months ago | 0

Smoothing just part of the data
One way data=rand(5000,1); data_smooth=data; % Just copy to retain original data data_ex=smoothdata(data(500:1500)); data_s...

10 months ago | 0

| accepted

imagedatastore grayscale to rgb for maskRcnn
You may convert the gray image to 3D array planes rgb_gray=cat(3,gray_image,gray_image,gray_image); Just do for one images, fo...

10 months ago | 0

| accepted

How can I reshape the given file into excel file ?
#Let's suppose final name is Test_CSV.csv data=readmatrix('Test_CSV.csv'); xlswrite('test_data.xlsx',data); You may extract ...

10 months ago | 1

Plot array of matrices

10 months ago | 0

How to convert complex single Image data into complex double image?
im2double() https://in.mathworks.com/help/matlab/ref/im2double.html

11 months ago | 0

How can I detect black color and mark bounding box from overall gray image?
Foremost segment that Black ROI regions, then apply the following- #1 It can be done using regionprops https://in.mathworks.co...

12 months ago | 1

| accepted

length(find((XM(2:end)>126.5 & XM(1:end-1)<126.5)｜ (XM(2:end)<126.5 & XM(1:end-1)>126.5)));
It represent the total elements in the vector (Except First One) XM(2:end) It represent the total elements in the vector (Exce...

12 months ago | 0

Sym 1x1 in Matrix
That .... dot dot represents the continuation in same line Continue Long Statements on Multiple Lines

12 months ago | 0

count how many pixel has value 255 in an image
data=GrayImage==255; total_pix=sum(data(:))

12 months ago | 1

| accepted