I would like help creating a custom matrix that follows this pattern: [1 1 -1 1; 1 1 1 -1; 1 2 -1 1; 1 2 1 -1; 1 3 -1 1; 1 3 1 -1; 2 1 -1 1; 2 1 1 -1; 2 2 -1 1; 2 2 1 -1; 2 3 -1…
Ask an expert. Trust the answer.
Academic and engineering questions answered by verified MATLAB professionals.
I would like help creating a custom matrix that follows this pattern: [1 1 -1 1; 1 1 1 -1; 1 2 -1 1; 1 2 1 -1; 1 3 -1 1; 1 3 1 -1; 2 1 -1 1; 2 1 1 -1; 2 2 -1 1; 2 2 1 -1; 2 3 -1…
Hello, I am trying to delete certain rows of an 1D array if a conditional statement is true. My code is: for i = 1:length(TF) if TF(i) == 1 pitch(i) = []; end end for the length…
I have 2 matrices A and B, both 7x3. I want to compare each element in A with its corresponding element in B, taking the larger of the 2 values and creating a new Matrix C. Could s…
How do I find the last element in a increasing matrix that is less than a particular number. For example if my matrix is A=[ 1 2 3 4 6 8 9] And I want the last number that is less …
Thank you for the help in advance. I wanted to plot the data usin' polar plot as the exmple shows https://matplotlib.org/examples/api/radar_chart.html the vectors are attached as: …
I have a set of 2D pictures, I want to only focus on a small blob in the middle while ignoring a sea of NaNs around it If I keep the NaNs, histeq spits out a plain white image. Is …
Hello everyone. After using the "montage" function, how can I apply the rgb2gray to the montage image?…
Hi, I have a set of XY coordinates, how do we transform given XY coordinates using 'lwm' tform? ROI_Coordinates_XY=[1,2; 2,3; 4,5; 6,7; 1,0; 1,6]; %XY coordinates that need to b…
for (i=1:x1) for(j=1:x2) Z=zeros(N,M) end end For example if x1=4,x2=4,N=8,M=8 I will have 16 zero matrices(8*8).All are named as z. I need to name them as z1,z2,z3 ... et…
I would like to add hitogram for each scatter plot. The code below plots in different color each slice of 3 dim scatter matrix. I would like to replace 'scatter' with 'scatterhist'…