Answered
Arguments of Reshape function with example
A = [1 2; 3 4; 5 6] ; % this is a 3*2 matrix reshape(A, [1,6]) reshape(A, [1 6]) % Both the above commands are same....

9 dagar ago | 0

| accepted

Answered
Rdata converting to mat file
R is an opensource code. You can download for free. Just download R, read the .rdata using load() and save the output using wr...

9 dagar ago | 1

Answered
How do I use the find function to track every last point that is black, so as to create a matrix of that border between white a black image. See Below
I = imread(myimage) ; I1 = imbinarize(rgb2gray(I)) ; [y,x] = find(I1) ; idx = boundary(I1) ; plot(x(idx),y(idx)) You can a...

9 dagar ago | 0

Answered
Concatenate elements of cell arrays vertically
A = {[8 9 0 0 1 0 1 0; 5 3 0 0 1 1 1 1]; [2 4 0 0 0 0 1 0; 3 9 0 1 0 0 0 1]; [6 2 1 1 1 0 1 1; 9 7 1 1 0 0 0 0]}; iwa...

9 dagar ago | 0

| accepted

Answered
Choosing a random number from a linearly spaced vector
xx= linspace(1,2,9) %a vector of linearly spaced values yy = xx(randi(9,1))

9 dagar ago | 0

| accepted

Answered
Trying to find an x value from a certain y value on my graph
idx = knnsearch(T_2,455) ; t(idx) If there is one-to-one mapping between (t,T_2) iwant = interp1(T_2,t,455)

10 dagar ago | 0

Answered
How to subplot inconsistent data in the loop?
The dimensions of x, x1, etc are not same to join them. % Demo x = rand(2,1) ; x1 = rand(4,1) ; x2 = rand(3,1) ; x =[x x1 x...

10 dagar ago | 0

| accepted

Answered
How do I delete all rows in a table depending on one column's NaNs?
A = [1 2 3 NaN 4 5 3 4 NaN ] ; A(isnan(A(:,3)),:)=[]

10 dagar ago | 0

| accepted

Answered
why do I get this error while using find to determine the element in my list?
You should not comapre floating point numbers like that. Try: tol = 10^-5 ; % try changing the tolerance find(abs(kff-k_f...

10 dagar ago | 0

| accepted

Answered
Trying to plot different graphs for different values on the same figure
% Part B clc; clear all; close all; A = 2 ; t1 = 0.1 ; delta_h = 0 ; h = 0.1 ; z = 2 ; Kc = 1:1:5 ; N = length(Kc) ; ...

11 dagar ago | 1

| accepted

Answered
How to iterate matrix multiple times?
La = [ -5.2622 3.2610 1.0999 0 2.0590 0 0 0 0 1.0999 -2.4128 0 -0.1...

11 dagar ago | 1

| accepted

Answered
Plot function not working
It is working fine. Copy and run like shown below: %to generate all different waveforms clc; a=5;b=6;c=7;d=8; t=0:0.01:1;...

11 dagar ago | 0

Answered
The figure in my code does not appear
Also you can save them into an array and plot after the loop: A = 2 ; Kc = 1 ; t1 = 0.1 ; delta_h = 0 ; h = 0.1 ; z = 2 ; ...

11 dagar ago | 1

Answered
The figure in my code does not appear
USe marker. As you are plottint point by point. clc; close ;clear all A = 2 ; Kc = 1 ; t1 = 0.1 ; delta_h = 0 ; h = 0.1...

11 dagar ago | 0

| accepted

Answered
Discretize the 3-D surface into individual points in MATLAB
Read about slice. This is your function.

11 dagar ago | 0

Answered
how to do pcolor plots from 3d data?
This is a 3D data, read about slice.

11 dagar ago | 0

Answered
ASSIGN FINE MESH VALUES TO A NEW COARSER MESH
It depends on how your mesh is. Is unstructured or structured. If structured mesh you can use interp2 or griddata. If it is unst...

11 dagar ago | 0

Answered
Missing value for predictor in Classification Learner App
Either you can remove those missing values or fill the missing values using is the function fillmissing. Read about fillmissing....

12 dagar ago | 0

Answered
numerical array is being saved as string
Read about str2double and str2num.

12 dagar ago | 0

Answered
Performing opposite of repelem()
Read about imresize. iwant = A(1:2:end,1:2:end) ;

12 dagar ago | 1

| accepted

Answered
A very strange problem
f='@(D0,D1,dt)[(-D0)*dt^0.5+(-D0*D1)*dt^1.5/2;1/2*(-1+(1)+(2*D1+2*D0^2)*dt/2)]'; f=vectorize(f); f=str2func(f); D0=1;D1=1;dt=...

12 dagar ago | 1

Answered
MatLab single precision epsilon versus double precision epsilon
For single precision epsilon is: 2^-23 For double precision epslon is: 2^-52

13 dagar ago | 0

Answered
What does ix=ismember(vars,["state","source"])| contains(vars,["lat", "lon", "timestamp", "damage", "event"]); do?
idx1=ismember(vars,["state","source"]) ; % gives logical indexing where state, source are presnt in vars idx2 = contains(var...

14 dagar ago | 0

| accepted

Answered
How can I create a set of points that follows the behavior of a given set of points?
That is pretty simple right....To whatever z = 14 points are there i.e. (x,y) simple replace z values with z = 15. And out of th...

14 dagar ago | 0

| accepted

Answered
Creation of circles of x radius in a matrix
% Make grid [X,Y] = meshgrid(1:10) ; % Make random radii for circle R = randi(5,size(X))/10 ; % Make circle coordinates ...

14 dagar ago | 0

| accepted

Answered
If I have a 2000 x 130 matrix, how do I convert it to a 500 x 130 matrix by adding all four rows together by using Matlab loop
A = rand(2000,130) ; [r,c] = size(A); nlay = r/4; B = permute(reshape(A',[c,r/nlay,nlay]),[2,1,3]); iwant = reshape(sum...

15 dagar ago | 1

Answered
Include legends based on column names in for loop
id = (1:10)' ; x = rand(10,1) ; y = rand(10,1) ; z = rand(10,1) ; T = table(id,x,y,z) figure hold on for i = 2:4 ...

15 dagar ago | 0

| accepted

Answered
how to plot specific column from a matrix
A = rand(100,4) ; plot(A(:,1),A(:,4)) % plot 1 column w.r.t. 4 column If this is not working. Show us the full error or tel...

15 dagar ago | 0

Answered
Search for a string within a string
Read about the function strfind. str = 'Need to search for a specific string inside a longer string and return the string and ...

15 dagar ago | 0

Answered
how to plot graph using multiple variable
theta = linspace(10,80)*pi/180; da=1e-9:3e-7; na = [1.30 1.31 1.32 ] ; P = zeros(length(na),length(theta)) ; for i = 1:l...

15 dagar ago | 0

| accepted

Load more