Answered
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

Answered
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

Answered
joining two timetables to complete the timeseries
You can fill the NaN values using fillmissing. Read about it.

14 dagen ago | 0

Answered
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

Answered
Finding A String In A Specific Column of A Table (SQLite)
Read about strfind and strcmp.

14 dagen ago | 0

Answered
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

Answered
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

Answered
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

Answered
Importing Mf4 file
https://in.mathworks.com/help/matlab/ref/videoreader.html

16 dagen ago | 0

Answered
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

Answered
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

Answered
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

Answered
how to randomly assign values from a vector and store it in another vector?
Read about randperm. load('detected.mat') idx = randperm(length(detected)) ; alocados = detected(idx) ;

16 dagen ago | 0

Answered
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

Answered
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

Answered
how do I know which toolboxes are installed?
https://in.mathworks.com/matlabcentral/answers/93913-how-can-i-determine-what-add-ons-i-have-installed https://in.mathworks.co...

17 dagen ago | 0

Answered
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

Answered
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

Answered
Reading excell sheet, Index exceeds the number of array elements (333)
Don't use xlsread. Use readtable. T = readtable(myfile) ;

17 dagen ago | 0

| accepted

Answered
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

Answered
I can't output my data into excel in rows even though it is a 17x1 array
USe write2table. Read about it.

18 dagen ago | 0

Answered
Multiply each element of matrix with corresponding element of another matrix by not using loop. Is there any other more efficient way?
Mer_EXP_rev = Prod_Year.*fundamental_price_level; Read about element by element operations. https://in.mathworks.com/help/mat...

18 dagen ago | 0

| accepted

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

18 dagen ago | 0

| accepted

Answered
code for this pattern
https://in.mathworks.com/matlabcentral/answers/184273-how-to-write-a-program-to-draw-a-triangle-of-stars-in-matlab

18 dagen ago | 0

Answered
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

Answered
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

Answered
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

Answered
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

Answered
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

Answered
How to fit the data with passing specific point and specific function
x=[0 0.166666667 0.333333333 0.5 0.666666667 0.833333333 1]' ; y=[0 1.09162 1.71904 2.52173 1.20849 2.47433 0]' ; n = 3; %...

18 dagen ago | 1

| accepted

Load more