How do I save my values of x each time the loop goes round?
%IC clear x = 1; time = 0; dt = 0.1; %for loop calculating x after 10 iterations xx = zeros(10,1) ; for n = 1:10; k1...

13 dagen ago | 0

| accepted

PSNR calculation for two photos
You have a inbuilt functions for that: Read here: https://in.mathworks.com/help/images/ref/psnr.html

13 dagen ago | 0

joining two timetables to complete the timeseries

14 dagen ago | 0

How to make colormaps like the attached colorbar?
Pick the RGB values of maximum value color you want and pick the RGB values of minimum value color you want to represent. Let ...

14 dagen ago | 0

Finding A String In A Specific Column of A Table (SQLite)

14 dagen ago | 0

how can I create a complex matrix representing a grid of points with corners at -1 - i and 1 + i.
% Option 1 A = [-1-i;1+i] % option 2 B = [-1-1i;1+1i] %1i is preferred % option 3 R = [-1 ; 1] ; % real part I = [-1 ; ...

15 dagen ago | 0

| accepted

Plotting excel data in MATLAB or any program
T = readtable('Calculation.xlsx') figure hold on yyaxis left plot(T.(1),T.(2),T.(1),T.(3),T.(1),T.(4)) yyaxis right plot(T...

15 dagen ago | 0

Not Enough Input Arguments
It seems you are straigh away running the function using run button or without providing the inputs. You need to define the inpu...

15 dagen ago | 0

Importing Mf4 file

16 dagen ago | 0

how to extrapolate a non uniform 3d data?
[X1,Y1]=meshgrid(lon(1):1:lon(end),lat(1):1:lat(end)); Check the dimensions of X1, Y1..they might be empty. You have asked the ...

16 dagen ago | 0

Array Indexing through a random plane or random line
You can save the Slice into a variable which be of a class matlab.graphics. From this variable you can extract what you want. ...

16 dagen ago | 0

| accepted

what changes are required in the code?
A table would be good to deal with. name = {'mary','john','anna','paul','elaina'}' ; gender = {'f', 'm', 'f', 'm', '...

16 dagen ago | 1

| accepted

how to randomly assign values from a vector and store it in another vector?

16 dagen ago | 0

what is the "count" mean?
[v1,count]=fscanf(fid,'%f',[2,numpt]); % reading data from the file into 2 rows and numpt coulmns; count gives you total nu...

16 dagen ago | 1

what wrong I am doing in the code?
% Make required structure S = struct ; S.name = {'mary','john','anna','paul','elaina'} ; S.gender = {'f', 'm', 'f', ...

16 dagen ago | 1

how do I know which toolboxes are installed?

17 dagen ago | 0

How to compute the area and the distance?
Area can be computed using area or by writitng your own formula. Distance can be calculated using the formula. Tp get distan...

17 dagen ago | 0

| accepted

Error in saving Edge file?
You have used two hypens before ascii, make it to single hypen and also there is a change in the sprintf command. save(sprintf...

17 dagen ago | 0

Reading excell sheet, Index exceeds the number of array elements (333)

17 dagen ago | 0

| accepted

Play music from user input
song = input('Enter link to you favorite song : ','s'); % <---- changed here fullname = 'song'; %change as required t...

17 dagen ago | 0

I can't output my data into excel in rows even though it is a 17x1 array

18 dagen ago | 0

Multiply each element of matrix with corresponding element of another matrix by not using loop. Is there any other more efficient way?

18 dagen ago | 0

| accepted

Storing individual elements of vector in cell.
x=[2 45 13] num2cell(x)

18 dagen ago | 0

| accepted

code for this pattern

18 dagen ago | 0

Select lines on a surf plot and output indices
Just use surf(20*log10(abs(s)),'EdgeColor', 'k') Use getpts or ginput or daatip, this will give you location/ index where yo...

18 dagen ago | 0

Takin the mean of data in tables
X1=[9 6 9;3 2 7]; X2=[0 2;4 0]; X3=[3 1 2; 8 9 7]; X=table(X1,X2,X3) ; [m,n] = size(X) ; iwant = zeros(2,n) ; for i = 1:n...

18 dagen ago | 0

| accepted

how to resample a data from 37 layers to 34 layers?
Read about interpn. A = rand(1076,915,34) ; [m,n,p] = size(A) ; [X,Y,Z] = ndgrid(1:m,1:n,1:p) ; [Xi,Yi,Zi] = ndgrid(1:...

18 dagen ago | 0

| accepted

I have a square matrix of ones and zeroes and I am trying to change all the ones to a user entered number. I am only successfully changing the first value in the matrix.
A = rand(3) ; A(A<0.5) = 0 ; A(A>=0.5) = 1 ; idx = find(A==1) ; for i = 1:length(idx) [r,c] = ind2sub(size(A),idx(...

18 dagen ago | 1

| accepted

How do I declare a blank column vector of unknown size?
O = zeros(n,1) ; % Initiate a zeros column vector N = NaN(n,1) ; % initiate a NaN column vector iwant = zeros([],1) ; ...

18 dagen ago | 0

| accepted