답변 있음
How to remove extra numbers to reduce size of vector?
A = rand(10000,1); s = 3; n = mod(length(A),s) ; iwant = A(1:end-n) ;

대략 4년 전 | 2

| 수락됨

답변 있음
Error using inline/subsref (line 12) Not enough inputs to inline function.
These lines: f1a=f1(a);f1b=f1(b); f2a=f2(a);f2b=f2(b); Should be: f1a=f1(m,a);f1b=f1(m,b); f2a=f2(m,a);f2b=f2(m,b); As the...

대략 4년 전 | 0

| 수락됨

답변 있음
plot vectors head to tail from dataset file
REad about quiver. May be you should check with: quiver(X1,Y1,X2-X1,Y2-Y1)

대략 4년 전 | 0

답변 있음
READ DATA OF MULTIPLE CSV FILES
csvFiles = dir('*.csv') ; N = length(csvFiles) ; for i = 1:N T = readtable(csvFiles(i).name) ; % Do what you want ...

대략 4년 전 | 1

| 수락됨

답변 있음
How to add string on x-axis and line starting from some point?
You can show up the string using text. Read about this function. You can draw line using plot.

대략 4년 전 | 1

| 수락됨

답변 있음
Probing a plot based on colormap information
I don't think you would be able to see the values like that. But you can see what value it has using: F = scatteredInterpolant(...

대략 4년 전 | 1

답변 있음
I need to filter this vector to pick out any numbers bigger than or equal to the threshold and put them into a new vector to be averaged
Let V be your vector and val be your threshold value. V(V>=val) =[] ; % remove the values greater than or equal to val iwan...

대략 4년 전 | 0

답변 있음
Reshape matrix with multiple columns into 2 columns
A = [1 2 3 4;5 6 7 8;9 10 11 12] B = [1 2;5 6;9 10;3 4;7 8;11 12] iwant = [A(:,1:2) ; A(:,3:4)]

대략 4년 전 | 0

| 수락됨

답변 있음
How to define a distance along a 2D nonlinear line generated by an equation, and find the corresponding distance along the x-axis?
Note the it is not a line but is a curve or a polynomial. You can achieve this by using the file exchange function interparc. ...

대략 4년 전 | 1

| 수락됨

답변 있음
2D Vector plot from available numerical data ?
Read about he function quiver.

대략 4년 전 | 0

답변 있음
How can I create a LOOP in order to take the magnitude from a 3D matrix at the same (x,y) coordinates but with different z?
Read about slice. Or if you have (X,Y) grid coordinates and the respective Z 3D data. USe knnsearch to get the index you want. C...

대략 4년 전 | 0

답변 있음
How to group elements of an array?
REad about reshape. A = rand(1,4096); B = reshape(A,[],32) ;

대략 4년 전 | 0

| 수락됨

답변 있음
How to use "Date Picker" to read a specific row and a column from a csv file that are associated with the date that was selected?
You can load the csv file data into MATLAB workspace using readtable. And then you can use ismember to get the index of the re...

대략 4년 전 | 0

| 수락됨

답변 있음
how calculate monthly mean from 6 hourly timestep?
REad about retime. https://in.mathworks.com/help/matlab/ref/timetable.retime.html

대략 4년 전 | 0

답변 있음
I HAVE A VECTOR AND I NEED TO INSERT 2 ZEROS BETWEEN EACH ELEMENT FROM THE ORIGINAL VECTOR.
v = [ 1 2 3 4 5] ; n = length(v) ; iwant = zeros(1,2*n-1) ; iwant(1:2:end) = v

대략 4년 전 | 0

답변 있음
Help regarding plotting points in graph
p = 0:99 ; x = 10.^p ; semilogy(x)

대략 4년 전 | 0

답변 있음
Matlab is not plotting
As you are plotting a point, you need to use marker. for i=1:10 M=1+i; plot(i,M,'.','MarkerSize',5) hold on en...

대략 4년 전 | 0

| 수락됨

답변 있음
select a region of an image.
Read about imcrop. Let I be your image. I = imread(myimage) ; x = 50 ; y = 70 ; w = 120 ; h = 100 ; Rect = [x y w h] ...

대략 4년 전 | 1

| 수락됨

답변 있음
How to compare elements of a 2D array with other elements of the same array.
You can use ismember. Read about the function ismember.

대략 4년 전 | 0

답변 있음
Measuring distance between centroid and perimeter points
If C is your centroid coordinates and P is your m*2 array of points. Where m is the number of points. Then you can get the dista...

대략 4년 전 | 0

답변 있음
how to plot country borders in regional data
You may download your required countries boundary shape file from this link: https://gadm.org/download_country.html You can re...

대략 4년 전 | 0

답변 있음
I keep receiving an error saying "execution of script drawpolygon as a function is not supported", even though it has previously worked.
It looks like you have named the present code as drawpolygon. No you should not name it on that name as drawpolygon is a inbuilt...

대략 4년 전 | 0

| 수락됨

답변 있음
For loops in strings
wavFiles = dir('*.wav') ; N = length(wavFiles) ; data = cell(N,1) ; fs = cell(N,1) ; for i=1:N [data{i},fs{i}]=audio...

대략 4년 전 | 0

| 수락됨

답변 있음
Specific interval of imported data
import1 = allahus_2017till2021(24:48,:);

대략 4년 전 | 1

답변 있음
Mapping non-integer values of matrix to another matrix via mapping table
v=[0.5 1.3 0.7 3 0.7 1.3]; m=[0.5 4; 0.7 5; 1.3 6; 3 7] ; w=[4 6 5 7 5 6]; [c,ia] = ismember(v,m(:,1)) ; iwant = m(ia,2)

대략 4년 전 | 0

| 수락됨

답변 있음
How to generate next random number which is +-30% of previous random number
a = 66 ; % present random number % generate next random number +-30 of a % choose the sign randomly if rand > 0.5 ...

대략 4년 전 | 0

답변 있음
assigning answers of logical operators to a vector using a for-loop
function y = testLucky(x) % testLucky(x) - determines whether input(x) is a lucky number % return true (1) if x is a lucky n...

대략 4년 전 | 0

답변 있음
polyfit with cell array with non-uniform dimensions
Let Current_mA, voltage_V be your cell arrays. They are of equal dimensions. N = length(approxPoly) ; for i = 1:N appro...

대략 4년 전 | 1

| 수락됨

답변 있음
How to use anonymous functions
The function needs a localCoordinate as input and it should be a 1X2 array. The array can have values 0,1,2. Depedning on the ...

대략 4년 전 | 0

| 수락됨

답변 있음
Digits that repeat in an n by m matrix
A = [ 9 5 2 1 5 3 3]; x = unique(A); N = numel(x); count = zeros(N,1); for k = 1:N count(k) = s...

대략 4년 전 | 0

더 보기