Réponse apportée
Subscript indices must either be real positive integers or logicals.
In matlab arrays are indexed starting at 1 so S_x(0) is an error. You can use another array to store the 'range' values rang...

plus de 2 ans il y a | 1

Réponse apportée
How to draw a letter T ? the background is black and the letter itself white
The current white block A(100:200,100:200) goes from column 100 to 200, so if you just make it longer 100:400 you will get a whi...

plus de 2 ans il y a | 1

Réponse apportée
Decide values of row in matrix for certain row intervals
since you are just changing the first number, use res(a:b,1)=1

plus de 2 ans il y a | 0

Réponse apportée
Can someone help me with this integration
you can do it without symbolic variables clear theta_s_vec = 0:0.1:pi/2; for ii = 1:numel(theta_s_vec) theta_s = theta_s...

plus de 2 ans il y a | 1

Réponse apportée
Multiple line with different variable in a plot
Here is an example. Loop for each B but use pi_o as a vector in your calculations. clear; pi_o = 2:2:30; B=[3 5 8]; figure...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
How to create ROI then know the total pixel number in ROI
You can use drawcircle to create a circular roi and then make a mask form it. Then you can sum or find the number of non-zero el...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
How can I map a specific location in MATLAB using the drone images with corresponding gps data latitude and longitude?
You can use geoplot: Plot line in geographic coordinates - MATLAB geoplot (mathworks.com) Also: Create Maps Using Latitude and ...

plus de 2 ans il y a | 1

Réponse apportée
Projectile Motion Equation with inputs of degree and first velocity
Here is an example Note you don't have to loop for each time value because matlab can perform calculations on the vector Note:...

plus de 2 ans il y a | 0

Réponse apportée
How to apply masks created by roipoly to movie?
You can store the roipoly result in a cell array like this rois = cell(1,4) for ii = 1:4 rois{ii} = roipoly(I); end Wou...

plus de 2 ans il y a | 0

Réponse apportée
Solving Integrations with Simpson's Rule
You need to declare Q as a function handle or use subs. syms r r0=3; Q = 4*pi*r*(1-r/r0)^(1/6); subs(Q,'r',0) %%% Alternati...

presque 3 ans il y a | 0

Réponse apportée
Is there a way to make this code output a plot with curved lines?
There might be an issue with your f or your jacobian After the first th2, your f~0 so norm(f)~0 and there are no convergence it...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
how to run principal component analysis in a 3D matrix
You can reshape the matrix to 2D and then when you get results convert it back to the orginal dimensions if needed Reshape arr...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How do I make a heat/color map from individual data points?
You can interpolate between the points using gridded data interpolation: Interpolate 2-D or 3-D scattered data - MATLAB griddata...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Copy and paste from MATLAB to Excel?
check the variable preferences preferences Variables and see if "." is selected for number handling See this previous ques...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
X,Y cordinates in a Matrix
Loop through your points like this, although I see XY is probably very long! A=zeros(3,3); disp(A) B=[1 1 1; 1 3 3]; fo...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How can I assign the same value to a repeating number?
(1) Not sure why "alocados" is just a random order of "datos" but you can do this any time, before or after Prb is assigned righ...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
eig versus svd functions to calculate eigenvalues of complex matrix
I saw an answer Student in stackexchange that says eigenvalues and singular values coincide for a matrix that is real symmetric ...

presque 3 ans il y a | 0

Réponse apportée
Stacked bar graph with repeating datetime
You need to reorder your data into a matrix with shape "Number of Unique Dates" by "Maximum Measurements on Any Date" Something...

presque 3 ans il y a | 1

A résolu


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

presque 3 ans il y a

Réponse apportée
Help me understand!
Equation 3 is a 2nd order system p''=..., the RK3 is given for 1st order p'=...(see it's first difference ) =..) See for exampl...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
How to deal with Index exceeds the number of array elements??
You could pad the missing data with 0 or nan. Anyway if you want to ignore the incomplete cycle just check out-of-bounds and co...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How to plot heatmaps inside a table?
Maybe just have different axis for each radar. There are a few ways, but tiledlayout is easiest: heatvals = rand(4,40); % r...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Lookup values in other table that has a range of values
Something like this would add the gamma variable to your first table, BUT it's matching to nearest gamma rophole12.gamma = inte...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Three dimensional averages?
You can specify the dimension of averaging: Average or mean value of array - MATLAB mean (mathworks.com) M = mean(A,dim) M = m...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How to fit multiple curves to histogram subpopulations?
You could fit a distribution to the histrogram using histfit or fitdist, then identify the number of modes or peaks, N. Then fi...

presque 3 ans il y a | 1

Réponse apportée
how is keep the output values in program?
you can use save and load, here is a quick example: % run once, save results x = 1; y = x+1; save('case1.mat') % modify a...

presque 3 ans il y a | 0

Réponse apportée
Calculate area from a signal
You can use trapezoidal rule: see trapz: Trapezoidal numerical integration - MATLAB trapz (mathworks.com) area = trapz(x,y) % i...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Phantom cine format and Photron mraw
I don't think there is a built in method, but using fread you can open mraw format. I used this one in the past: Reader class f...

presque 3 ans il y a | 0

Réponse apportée
How to use a filename character array as a name of a variable?
You can use EVAL (see Stephen's comment to why this can cause error) [~,varname]= fileparts(filename) data = [....]; % your da...

presque 3 ans il y a | 0

Charger plus