Answered
how to change a txt file name dynamically?
for i = 1:10 fname = strcat('M1S1C',num2str(i),'_EMG.txt') end

8 years ago | 0

Answered
i am getting an error "Matrix index is out of range for deletion"
Check the dimensions of imname.....it doesnt have the elements which you expect to delete. So the error. A = rand(10,1) ; A...

8 years ago | 0

| accepted

Answered
How can I resolve an invalid date argument using plot?
Read about plot x = (1804:2300); y = 10./(1+(9.*exp(-0.01*x))); plot (x,y, 'b', '-'); hold on x = [1804 1927 1960 1974 1...

8 years ago | 0

Answered
Extracting data from a matrix for a particular threshold
Read about find idx = A>0.6 | A<-0.6 ;

8 years ago | 0

Answered
Can i combine 2 or more images and display single axes
I1 = imread('peppers.png') ; I2 = imread('peppers.png') ; I12 = [I1 ;I2] ; imshow(I12) If the images are of different size...

8 years ago | 0

Answered
How to merge str array with double array?
A = {'21/02' '22/02' '25/02'} B = [2 7 9 5 7 0 3 6 1] iwant = strcat(A,{' '},num2str(B))

8 years ago | 0

Answered
How to count the number of nonzero numbers in a row.
Read about nnz A=[ 0 0 0 0 0.4 0 0 0.3; 0.1 0 0 0.7 0 0.2 0 0 ; 0 0 0.6 0 0 0 0 0.9] ; [m,n]...

8 years ago | 0

| accepted

Answered
dynamic graph, power time
t = 0:0.001:60 ; y = sin(t) ; comet(t,y)

8 years ago | 0

Answered
how reshape the separated signal to original signal ?
YOu pick the indices and get what you want. x= [1 2 -6 9 -7 8 -8 -5 2 4 -6 4 -4 -5 -7 6 10 2 3 7 -8 9 -8 -5 4 -6] Xp=x(x>0)...

8 years ago | 0

| accepted

Answered
Index exceeds matrix dimensions
This error happens when you try to extract more number of elements from array that present in the array. A = rand(10,1) ; ...

8 years ago | 0

Answered
Remove pixel == 1 from an RGB image
YOu cannot remove them, replace them with any other value....... A = I(:,:,1) ; idx = A>=175 & A<=193; A(idx) = 0 ; I(:,:,1)...

8 years ago | 0

| accepted

Answered
assign values to a matrix without a loop
[m,n] = size(P) ; I = repmat((1:m)',1,2) ; idx = sub2ind(size(P),I,A) ; iwant = P(idx)

8 years ago | 1

| accepted

Answered
Hi, i'm trying to create loop for different values of Es_Nos_dB and i want to simulate for each 100 times to get avarage
Nsimul=100 ; Es_Nos_dB = 3:5; for i = 1:length(Es_Nos_dB) for j = 1:Es_Nos_dB(i) [i,j] end end

8 years ago | 0

Answered
Temperature analysis of an IR image
Read about imread

8 years ago | 0

Answered
Create the matrix with some limits
p = [1 2] ; n = 10 ; q = repmat(p,1,n)

8 years ago | 0

Answered
how to create and store a matrix from a dataset comprising of certain rows from the dataset.
load iris.dat setosa = iris((iris(:,5)==1),:); % data for setosa versicolor = iris((iris(:,5)==2),:); ...

8 years ago | 1

| accepted

Answered
How to get slope over each grid?
Read about gradient A = rand(10) ; [dx,dy] =gradient(A) ; % get x2-x1, y2-y1 m = dy./dx ; % get slope pco...

8 years ago | 0

Answered
how can i find the value for the amplitude and frequency using fft?
Note that max gives you the index of the max value also. [aa_max,idx] = max(aa)

8 years ago | 0

Answered
Separating a structure field by unique elements?
You need not to convert the Table into structure.......Table is very elegant and you can do what ever you want. Check the below ...

8 years ago | 0

Answered
Why is the P matrix organized the way it is for making a plot of a cube?
YOu run the below code and see the way your lines moving....they make a continuous lines, if you arrange like that. A = [0 0...

8 years ago | 0

| accepted

Answered
How can I obtain time seris data from ECMWF netcdf file
YOur data read shoule be a matrix or array..you cannot store them like the way you did. YOu shoule do as below: clc clear a...

8 years ago | 0

Answered
I am getting an error message: Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 1-by-2.
No error in 2017b......Try to initialize the z matrix. x = 0; y = 0; z = zeros([],2) ; while y < 9.8 y = 10*(1-exp(-x/...

8 years ago | 0

Answered
Multiple polar plot in one figure
theta = 0:0.01:2*pi; c=cos(theta); s=sin(theta); C11 = [314.127; 157.485; 155.944]; C22 = [314.609; 157.798; 156.038]; C12 ...

8 years ago | 0

| accepted

Answered
How to assign multiple variables to an array
What is the necessity to assign? YOu can access them by PRn(1), PRn(2)..etc..It is a bad idea to do so.

8 years ago | 0

Answered
What this "t=0:0.0001:0.1;" statement represent and how this syntax work in the given program?
t=0:0.0001:0.1 The above line generates an array with first element as 0 and last element as 0.1, where each sucessive elements...

8 years ago | 1

Answered
Changing color of individual bars in a grouped bar chart
YOu can use (bar,....','stacked').. You need to play with inputs to get your value. c = [25;55]; names = {'GR = 5.57' ; 'G...

8 years ago | 0

Answered
Use of nested loop
Read about function double

8 years ago | 0

Answered
how place rgb values on our own coordinates
YOu may understand this and extend it to your case: I = imread('cameraman.tif') ; [nx,ny] = size(I) ; % make a circle for ...

8 years ago | 0

| accepted

Answered
plot or stem the length of negative and positive signal?
y1 = rand(10,1) ; x1 = 1:length(y1) ; y2 = rand(15,1) ; x2 = [1:length(y2)]+length(y1) ; figure hold on stem(x1,y1,'r') ...

8 years ago | 0

| accepted

Answered
Loop counter help please
Check the below pseudo code. N = 10 ; iwant = zeros(N,1) ; for i = 1:N iwant(i) = i ; end

8 years ago | 0

Load more