Answered
Find the position of a minimum inside an array
[Value,Position] = min(V)

7 years ago | 0

| accepted

Answered
matlab graph for (x-1).^2.*y.^2./(x-1).^2. y.^2 using mesh
plenty of examples: https://in.mathworks.com/help/matlab/ref/mesh.html#f27-128170

7 years ago | 0

Answered
How to read .txt file variable and value that are separated with '' ?
s = fileread('sample.txt'); V = strsplit(s,'\n'); ss = regexp(V,'.*(?=[\=])','match'); ss = [ss{:}]; T = table; vals = rege...

7 years ago | 0

| accepted

Answered
A simple matrix question
B = flip(A)

7 years ago | 0

Answered
Sum over a dimension
B = cumsum(A,3)

7 years ago | 0

| accepted

Answered
Taking all values of a row if matrix fulfills vector=1
b=a(vector==1,:)

7 years ago | 1

| accepted

Answered
How to define variables in the main program instead of in the function file
function f = rigid(t,y,a) % syms a %% not needed f = zeros(2,1); % a column vector f(1) = a*y(2) * y(1); f(2) = -y(1) * y...

7 years ago | 0

| accepted

Answered
How to assign to an empty array
It's always better that you provide the data as Rik mentioned: column = 1; idx = cellfun('isempty',table2cell(T(:,column))); %...

7 years ago | 0

Answered
Dimensions of matrices being concatenated are not consistent.
str2double(OurTotal_Float)

7 years ago | 0

| accepted

Answered
Create a random sequence with specified elements
s = repelem(1:numel(Q),Q); S = s(randperm(numel(s)))

7 years ago | 0

| accepted

Answered
convert an array into its counting sequence..
According to what I understand you want to count the number of occurances of each unique elements in the array x, then: x = [1 ...

7 years ago | 0

Answered
How do you create multiple symbolic variables?
n = 4; X=sym('x',[1,n]); syms(X) If you're using 2019a or later: n = 4; syms x [1 n]

7 years ago | 0

| accepted

Answered
Matlab can't recognize the 0.06 in array 0.01:0.01:0.1
Use ismembertol() https://in.mathworks.com/matlabcentral/answers/57444-faq-why-is-0-3-0-2-0-1-not-equal-to-zero#answer_69519 -...

7 years ago | 1

| accepted

Answered
how to increase a column with every for loop
With loop: N = 7; xy = zeros(numel(x),N); xy(:,1) = x .* y; for k = 2:N xy(:,k) = xy(:,k-1) .* y; end Without loop:...

7 years ago | 0

Answered
Plot function not work
You have a script named plot.m, move it/rename it/delete it from MATLAB's path.

7 years ago | 0

Answered
Create matrix of vector from 3 differents cell array
W = cellfun(@(x,y,z) {x,y,z},a,b,b,'un',0) % W{1} is A and so on

7 years ago | 0

| accepted

Answered
How to extract an array of numbers from a single string ?
s=" -11023,1234.2,1345,1467,-1567,-135,-1234 "; Wanted = sscanf(s,'%f,')

7 years ago | 1

| accepted

Answered
How to best do unit converstion in MATLAB
If you have the Symbolic Math Toolbox: https://in.mathworks.com/help/symbolic/symunit.html

7 years ago | 0

Answered
Convert single string with many numbers to vector
hue_vec = str2double(regexp(hue,'\d+','match'))

7 years ago | 0

| accepted

Answered
How can I index a matrix using an array?
A = accumarray(idx,1,[],[],0)

7 years ago | 2

| accepted

Answered
Could anyone help me how to solve the issue
[v,idx] = max(A,[],2); Wanted = zeros(size(A)); Wanted(sub2ind(size(A),(1:size(A,1)).',idx)) = v

7 years ago | 0

| accepted

Answered
Checking if word/words are present in a sentence in a table cell.
[Rows,Columns]=find(strcmp(T{:,:},'M3 TRIPPED')) % T your table

7 years ago | 1

Answered
why it gives,Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
When asking a question provide the code in the question not in tags. See if you have correct number of parentheses in the functi...

7 years ago | 0

Answered
Convert double array into column vector
reshape(f,[],1) % column vector reshape(f,1,1,[]) % 3D

7 years ago | 0

| accepted

Answered
If-statement, comparison of two vectors, both containing zero elements
Wenn ich richtig verstehe, was du machen willst, dann: vec1 = [1 0 3 6 43 56]; vec2 = [2 9 5 0 23 43]; for k = 1:numel(vec1) ...

7 years ago | 0

| accepted

Answered
From the number to make a fraction?
X = zeros(size(y)); X(1:2:end) = fix(x / 1e5); X(2:2:end) = rem(x , 1e5); z = X-y

7 years ago | 0

Answered
Assign values to symbolic matrix
What you're trying to do is a bad idea ( https://in.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not...

7 years ago | 0

| accepted

Answered
How add to 1 to the 1st element of array?
A(1) = 1

7 years ago | 0

| accepted

Answered
must return a column vector
[t,y]= ode45(@lodosact,[0,2],[100,200]); plot(t,y) title('Actividad 20') xlabel('T') ylabel('ds/dx') grid on function dy...

7 years ago | 0

Answered
Number of unequal elements in a matrix
unique(A)

7 years ago | 0

| accepted

Load more