Réponse apportée
Index in position 2 exceeds array bounds. Index must not exceed 1. Error in refPose = data.ActorSpecifications(1,46).Waypoints;
Change this line: refPose = data.ActorSpecifications(1,46).Waypoints; to refPose = data.ActorSpecifications(46,1).Waypoints;

environ 3 ans il y a | 0

Réponse apportée
reshape help doing PCA when all images contained in one .mat file
Your X data is of size 3240X20, you cannot reshape its each column to size 64X56..because 64X56=3584~=3240. So you need to use y...

environ 3 ans il y a | 0

Réponse apportée
Loop variable for readtable arguments
txtFiles = dir('*.txt') ; N = length(txtFiles) ; for i = 1:N T = readtable(txtFiles(i).name) end

environ 3 ans il y a | 0

| A accepté

Réponse apportée
3D matrix transpose and dimensioning
% Data for demo A{1,1} = rand(3,3,3) ; A{2,1} = rand(3,3,3) ; A{3,1} = rand(3,3,3) ; A{4,1} = rand(3,3,3) ; A % Conversio...

environ 3 ans il y a | 1

Réponse apportée
How can I split the excuation of multiple for loops ?
for k = 1:10 for i=1:5 X1(i) = do some calculation X2(i) = do some calculation end en...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Hello, I've got the problem. Can any one help me with that error?
It looks there is some problem with conditions. Check the conditions. Without the conditions it is working fine. syms x(t) Dx...

environ 3 ans il y a | 0

Réponse apportée
How to name axes from the script
plot(rand(1,10)) labelx = input('Input Xlabel:') ; labely = input('Input Ylabel:') ; xlabel(labelx) ylabel(labely)

environ 3 ans il y a | 0

Réponse apportée
how can I calculate A^n when n is a symbolic positive integer?
A = [1/2,1/2,0,0;1/2,0,1/2,0;1/2,0,0,1/2;0,0,0,1] syms n positive integer A.^n

environ 3 ans il y a | 0

Réponse apportée
Find the minimum and maximum value of internal intervals in an array
clc; clear all ; array = [1 2 3 NaN NaN NaN -1 0 5 NaN 0.25 NaN 5 6 7]; M = array' ; idx = isnan(M); ...

environ 3 ans il y a | 1

| A accepté

Réponse apportée
Find coordinates of point on original image after using interp2
A=round(rand(10).*10); [nx,ny] = size(A) ; [X,Y] = meshgrid(1:ny,1:nx) ; [x_a,y_a] = meshgrid (linspace(1,10,8),linspace(1...

environ 3 ans il y a | 0

Réponse apportée
I have a two column item 1st, Column is child's name and 2nd column is his/her choice of toys. For a given list of Toys I bought, make a table against each toy to each child.
A=["Child1" "Dog" "Child1" "Cat" "Child1" "Babbie" "Child2" "Tractor" "Child2" "Plane" "Child2" "...

environ 3 ans il y a | 0

Réponse apportée
Extract the values corresponding to the specific filed in the struct
iwant = [S(:).latency] Else other option, would be convert your structure to table and access the data you want. T = struc2ta...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
How to reduce space between plots in subplot?
You may consider using this fileexchange function: https://in.mathworks.com/matlabcentral/fileexchange/27991-tight_subplot-nh-nw...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
How can I do this polynomial with sympolic in matlab
p = sym('P',[1 4]) ; x = sym('x',[1 4]) ; f = p*x.'

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Use vector to create 3rd dimension at each point in a matrix
N = 10 ; vec = 1:5 ; b = repmat(vec',1,N,N) ;

environ 3 ans il y a | 0

| A accepté

Réponse apportée
How to calculate distance left in a specific time interval
start = [1 2]; endpos = [8 8]; x = [start(1) endpos(1)]' ; y = [start(2) endpos(2)]' ; interval = 0.1; vel = 0.1; ...

environ 3 ans il y a | 0

Réponse apportée
Which products used for CSE student?
You should read this: https://in.mathworks.com/discovery/numerical-analysis.html#:~:text=Numerical%20analysis%20is%20a%20branch,...

environ 3 ans il y a | 0

Réponse apportée
How to fix : Unable to perform assignment because the left and right sides have a different number of elements.
This is a simple error, it occurs when you try to save more number of elements into an array than it is initialized for. Ex: ...

environ 3 ans il y a | 0

Réponse apportée
How to generate all the possible data points in this 2D triangle?
P = [0 0 ; 0 1 ; 1 0] ; % vertices of triangle m = 20 ; n = 20 ; x = linspace(min(P(:,1)),max(P(:,1)),m) ; y = linspace(mi...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Ploting of two vectors with different lengths
Let x be of size 42471x1 and y be of size 29125x1. nx = length(x) ; ny = length(y) ; % convert y to size of x id = linspa...

environ 3 ans il y a | 0

Réponse apportée
create a variable with multiple time steps
LEt (x,y) be your data and t be your time. nx = length(x) ; nt = length(t) ; Z = zeros(nx*nx,nt) ; % it is a 2D matrix; ea...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
How can ı find mode shape from natural frequency
[v,d]=eig(B,A); plot(v)

environ 3 ans il y a | 0

Réponse apportée
Plot three color maps in the same figure?
figure subplot(131) pcolor(rand(10)) ; colorbar subplot(132) pcolor(rand(10)) ; colorbar subplot(133) pcolor(rand(10)) ;...

environ 3 ans il y a | 0

Réponse apportée
Array indices must be positive integers or logical values
This line: E_ws(0) == 10 gives you error. MATLAB indexing starts from 1. It cannot be zero. Think of it.

environ 3 ans il y a | 0

| A accepté

Réponse apportée
How to sort minimum value from a matrix
number = 6; A = 1+10*(rand(number,2)); B = [4,8; 6,8; 8,8; 6,6.7; 6,5.4; 6,4.1]; idx = knnsearch(A,B)

environ 3 ans il y a | 0

Réponse apportée
how to optimize a sweep for solving inequalities?
You need to use syms. You can straight away substitute the values in the equation and get the lligcal indexing. % ki < 0 && ...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Solve a nonlinear function with one variable
syms x eq = x - x^2 + 2*sin(x)*(x-1) == 0 s = vpasolve(eq)

environ 3 ans il y a | 1

Réponse apportée
How can i use quadprog when the value of variables x≠0
USe: x > ub and x < lb

environ 3 ans il y a | 0

Réponse apportée
can anyone help me to generate mesh with matlab for this shape?
You can have a look on this: https://in.mathworks.com/matlabcentral/fileexchange/44670-mesh-a-plate-with-hole You can make f...

environ 3 ans il y a | 0

Réponse apportée
How to solve this question in MATLAB?
dx = 0.25 ; dt = 0.1 ; x = 0:dx:1 ; t = 0:dt:1 ; [x,t] = meshgrid(x,t) ; U = exp(-pi*t/4).*sin(pi*x/2) ; surf(x,t,U)...

environ 3 ans il y a | 0

| A accepté

Charger plus