Answered

Create x and y coordinates with available values

cor_xy=[randi(20),randi(30)]

Create x and y coordinates with available values

cor_xy=[randi(20),randi(30)]

7 months ago | 0

| accepted

Answered

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)))]

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

Answered

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...

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

Answered

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...

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

Answered

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 ...

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

Answered

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.

long = ncread(filename,'XAXIS') lat = ncread(filename, 'YAXIS') SST = ncread(filename,'SST') SST_Oct = SST(:,:,10:10) SST_No...

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.

long = ncread(filename,'XAXIS') lat = ncread(filename, 'YAXIS') SST = ncread(filename,'SST') SST_Oct = SST(:,:,10:10) SST_No...

8 months ago | 1

| accepted

Answered

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)...

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

Answered

Some basic MATLAB questions

Hint: rand https://in.mathworks.com/help/matlab/ref/rand.html

Some basic MATLAB questions

Hint: rand https://in.mathworks.com/help/matlab/ref/rand.html

8 months ago | 0

Answered

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...

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

Answered

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...

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

Answered

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); ...

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

Answered

Unrecognized function or variable 'readstruct'

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

Unrecognized function or variable 'readstruct'

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

9 months ago | 0

| accepted

Answered

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) ...

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

Answered

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...

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

Answered

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...

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

Answered

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 ...

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

Answered

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;...

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

Answered

About using X = dither(RGB,MAP)

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

About using X = dither(RGB,MAP)

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

Answered

I need the value of a changing variable at a specific value

The value is Cl_val=Cl(find(LDR==max(LDR)))

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

Answered

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...

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

Answered

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...

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

Answered

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...

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

Answered

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 ...

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

Answered

How to convert complex single Image data into complex double image?

im2double() https://in.mathworks.com/help/matlab/ref/im2double.html

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

Answered

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...

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

Answered

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...

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

Answered

Sym 1x1 in Matrix

That .... dot dot represents the continuation in same line Continue Long Statements on Multiple Lines

Sym 1x1 in Matrix

That .... dot dot represents the continuation in same line Continue Long Statements on Multiple Lines

12 months ago | 0

Answered

count how many pixel has value 255 in an image

data=GrayImage==255; total_pix=sum(data(:))

count how many pixel has value 255 in an image

data=GrayImage==255; total_pix=sum(data(:))

12 months ago | 1

| accepted

Answered

How to open .raw extension image file in matlab?

Try with hdrread function MATLAB Docs

How to open .raw extension image file in matlab?

Try with hdrread function MATLAB Docs

12 months ago | 0

| accepted