Answered
Extract float data from a binary file
fid = fopen(myfile,'r') ; str = fread(fid,9,'*char')' ; num = fread(fid,9,'*float') ; fclose(fid) ;

7 years ago | 0

| accepted

Answered
How to store value inside a for loop
x_val = zeros(1,10) VV = cell(10,1) ; xx = cell(10,1) ; for r = 1:10 [v,x] = ode45(@(v,x) diffeq(v,x,r),[0 610],0.0001...

7 years ago | 0

Answered
How to Create faces from Vertex [X Y Z] co-ordiante for STL write ? without inbuilt STL command?
Read about delaunay and delaunayTriangulaion. https://in.mathworks.com/help/matlab/ref/delaunay.html https://in.mathworks.com...

7 years ago | 0

Answered
readtable xlsx with date
T = readtable('Test.xlsx') ;

7 years ago | 1

Answered
I NEED TO DIVED TWO ARRAYS OF DIFFERENT SIZES
R = [NaN R] ; iwant = F./R ;

7 years ago | 0

Answered
Undefined operator .^ occurs help!!
xdata = [0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 1.05 1.1 1.15 1.2 1.25 1.3 1.35 1.4 1.45...

7 years ago | 1

Answered
Matching of eigenvalues of 2 matrices
A1 = rand(2) ; [v1,d1] = eig(A1) ; Columns of v1 gives eigen vectors.........diagonal (diag(d1)) gives you eignvalues. To co...

7 years ago | 0

Answered
Average brightness of image
brightness = mean2(myImage);

7 years ago | 1

| accepted

Answered
How to Matrix Multiply instead of a for loop?
A = magic(4) ; n = 1:size(A,2) ; iwant = A.^n

7 years ago | 0

Answered
Extract data from text file
T = readtable(myfile)

7 years ago | 0

Answered
How to define my N by 2 matrix of values to x and y
x = N(:,1) ; y = N(:,2) ;

7 years ago | 1

| accepted

Answered
How do I plot a figure and animate overlaying plots in a separate figure?
Check Animation code here in the link: https://in.mathworks.com/matlabcentral/fileexchange/33082-simplependulum?focused=5201720&...

7 years ago | 0

Answered
How to get consecutive rows from a matrix
A = 1:27 ; iwant = min(reshape(A,9,[]))

7 years ago | 0

Answered
Plotting a 2D "Time Snapshot"
plot(t,u(20,:)) The one you are trying: plot(:,401); % this is wrong YOu have not specified the variable there. It should b...

7 years ago | 0

| accepted

Answered
Find the intersection points between the phase plot and a line?
Use this: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections?focused=5165138&tab=function

7 years ago | 0

Answered
Not plotting all the values in a single graph
x = -10:0.1:10; a = [1 3 5]; figure(1) u = zeros(length(a),length(x)) ; for i = 1:length(a) u(i,:) = (1/4*a(i))*(1+erf...

7 years ago | 1

| accepted

Answered
standardizeMissing not working on all table columns
L = cellfun(@length,T.sheepCOM_transport) ; T.sheepCOM_transport(L==1) = {NaN} ;

7 years ago | 1

Answered
How to randomly divide two time-series of input values and target values into training, validation and test sets?
x = 1:220 ; y = rand(size(x)) ; Q = [x' y'] ; trainRatio = 70/100 ; valRatio = 15/100 ; testRatio = 15/100 ; [tra...

7 years ago | 2

| accepted

Answered
How to find positive values in 1500 matrices(720*1280)?
If A is your matrix. idx = A>0 ; % this gives indices of posittive values idx = sign(A) % this gives sign of values in ...

7 years ago | 0

Answered
How to split array which is discontinuous and plot them?
a=[1 2 3 4 5 6 7 8 9 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 50 51 52 53 54 55 56 57 ...

7 years ago | 0

Answered
gradient issue for matlab
Let A be your 47X2 matrix. q = A(:,1) ; v = A(:,2) ; dq_dv = diff(q)./diff(v) ; % dq/dv dv_dq = diff(v)./diff(q) ; ...

7 years ago | 1

| accepted

Answered
m_coast not working in m_map
Change finite to isfinite

7 years ago | 0

| accepted

Answered
Varying value of stiffness
You may refer this: https://in.mathworks.com/matlabcentral/fileexchange/34381-mathieu-equation-parametric-oscillator

7 years ago | 0

| accepted

Answered
Check common elements in two vectors and remove them from both the vectors leaving any duplicate. (Example Inside)
A = [1 2 3 4 4 4 5 5 6] B = [2 4 5 5 9 ] new_A = setdiff(A,B) new_B = setdiff(B,A)

7 years ago | 0

Answered
Calculate minimum distance between points in a mesh
A = rand(20, 2); x = A(:, 1); % x coordinates y = A(:, 2); % y coordinates d = pdist2(A,A) ; % Get minimum distance d(d=...

7 years ago | 1

| accepted

Answered
How to rectify this error,
Don't run the function usinf run/ F5. Give inputs and call it. Theta = pi ; age = 30. ; chol = rand ; [J,grad] = compu...

7 years ago | 1

| accepted

Answered
Unknown variable with str2num ?
Read about str2num. It takes string as input and conerts it to number. If the input is not string it will throw error like in yo...

7 years ago | 0

Answered
how to split channels of a video
If you have a RGB frame F os size m*n*3... R = F(:,:,1) ; G = F(:,:,2) ; B = F(:,:,3) ;

7 years ago | 0

Answered
Error using imread The file name or URL argument must be a string. Error in imread Error in image_block (line 29) currentfilename = imread(imagefiles);
imagefiles= dir('*.png'); for i=1:NFR currentfilename = imagefiles(i).name; I = imread(currentfilename); % Do what you want ...

7 years ago | 0

Answered
how to change color space of any video
vidObj = VideoReader('C:\Users\Public\Videos\Sample Videos\Wildlife.wmv'); % video file %% Read the video frame by frame nu...

7 years ago | 0

| accepted

Load more