Answered
How to convert structure to gray image
Read the individual cell array data element, apply image function % cell_element=.... % image(cell_element) % axis off; You ...

2 years ago | 0

Answered
Merge two arrays w/o for-loop. Speed-up
B1 = [52, 52, 52, 52] B2 = [0.437288188, 0.437288188, 0.437288188, 0.437288188] C=B1+B2

2 years ago | 0

| accepted

Answered
Using while loop in a video
vid=VideoReader('video.mp4'); frame_num=vid.NumFrames; frame_format='.jpg'; vid=read(vid); for i=1:frame_num %Initial Level:...

2 years ago | 0

| accepted

Answered
Write code to print ten columns of every number between 1 to 10
Read at MATLAB Docs randi function %Hint: data=randi([1,10],[1,10]) %random array-10 columns between 1 to 10 result=repelem(...

2 years ago | 0

Answered
How to generate an array based on the values of another array?
A=[1 3;3 1;2 4;4 3] B=A; A(B==2)=4; A(B==1)=3; A(B==3)=2; A(B==4)=1; A

2 years ago | 0

| accepted

Answered
How to save multiple vector signals in one variable using wavelet Denoising?
F data can be store in cell array. F=cell(1,60); for i = 1:60; x = y(i,:) ; F{i}= wden(x,'rigrsure','s','mln',5,'d...

2 years ago | 0

| accepted

Answered
How to smooth and normalize noisy data
Please check the smoothdata Matlab function https://in.mathworks.com/help/matlab/ref/smoothdata.html it can smooth the data i...

2 years ago | 0

Answered
What is the correct way to calculate the average dice score for multiple data in binary image segmentation?
Here>explanation with references https://stats.stackexchange.com/questions/550646/proper-way-to-calculate-mean-dice-coefficient...

2 years ago | 0

Answered
Decode the cryptogram was encoded from 2x2 matrix
"but it keeps saying invalid in the inverse command and I can't figure why" >> X =[5 2; 25 11; -2 -7; -15 -15; 32 14; -8 -13; 3...

2 years ago | 0

| accepted

Answered
How to change maximum Index value in MATLAB
I re-read the question again- I want to find the maximum pixel (index) for example in above 55 is the maximum pixel (index) th...

2 years ago | 0

Answered
Matlab Extracting X and Y coordinates
Concept wise: cross_index=find(data1==data2); This may not work, if there may floating numbers, in that case you may follow th...

2 years ago | 0

Answered
About interpolation pressure & temperature
The are multiple ways to sort the structure fields data points- Procedure 1: b=load('Tempe.mat'); temp_data=sort(vertcat(b.T...

2 years ago | 0

Answered
I need help trying to write a code for a logistic map that requires a range of r between 0 and 5
Refer the following File Exchange FIle, it may be useful- https://in.mathworks.com/matlabcentral/fileexchange/32424-logistics-m...

2 years ago | 0

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

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

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

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

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

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

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

2 years ago | 0

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

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

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

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

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

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

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

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

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

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

2 years ago | 0

Load more