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

Rdata converting to mat file

9 dagar ago | 1

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

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

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

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

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

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

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

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

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

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

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

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

Discretize the 3-D surface into individual points in MATLAB

11 dagar ago | 0

how to do pcolor plots from 3d data?

11 dagar ago | 0

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

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

numerical array is being saved as string

12 dagar ago | 0

Performing opposite of repelem()

12 dagar ago | 1

| accepted

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

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

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

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

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

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

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

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