Beantwortet
cross product is wrong
Geogebra treats the dta as symbolical expressions. Matlab converts -2159/277 to a numericalvalues as default. If you want to us...

etwa 5 Jahre vor | 2

Beantwortet
clearing a figure
A simplified version of your code without clf and flickering: x = [0; 0; 6; 6; 6; 0]; y = [0; -3; -3; 0; 3; 3]; z = [0; 0;...

etwa 5 Jahre vor | 0

Beantwortet
How do I gapfill a vector only if gaps (NaNs) are 10 elements or less?
With FEX: RunLength : x = [1,2,3,5,7,9,10,9, NaN,NaN,5,3,2,NaN,NaN,NaN,NaN,NaN, ... NaN,NaN,NaN,NaN,NaN,NaN,12,13,14,15,16...

etwa 5 Jahre vor | 0

| akzeptiert

Beantwortet
How to force matlab in a loop to always give you scientific/exponential notation?
What about: ax = axes; plot(1:10); drawnow; ax.YAxis.Exponent = ceil(log10(max(ax.YAxis.Limits)));

etwa 5 Jahre vor | 0

Beantwortet
how to sort a cell array inside a struct?
Expand C = splitapply(@(x) {x}, T.ID_number, G); to C = splitapply(@(x) {sort(x)}, T.ID_number, G);

etwa 5 Jahre vor | 0

Beantwortet
Why stock DOT function is suboptimally implemented
In dot.m we find a test for integer types, checks by isvector, comparison of lengths, both vectors are shaped by (:) and after a...

etwa 5 Jahre vor | 0

Beantwortet
Save disp output as a string/cell variable
Since Matlab R2021a: str = formattedDisplayText(x)

etwa 5 Jahre vor | 4

Beantwortet
How can I translate one matrix into a new one based on given old and new (row, column) indices?
Z = [1:4; 5:8; 9:12; 13:16]; MatShift(Z, [-1, -1]) MatShift(Z, [2, 2]) function Y = MatShift(Z, Shift) % Input: Z: Matrix,...

etwa 5 Jahre vor | 0

| akzeptiert

Beantwortet
How to find out point of change of sequence of ones and zeros?
What do you expect in the other rows of the 4th column? All rows must have the same number of columns, according to the definiti...

etwa 5 Jahre vor | 0

| akzeptiert

Beantwortet
Send "abort signal" to MEX
You could check from inside the MEX function, is a key is pressed. Or you can use mexCallMATLAB to run a drawnow command and re...

etwa 5 Jahre vor | 0

| akzeptiert

Beantwortet
How to write cyclic permutation as an array in matlab?
P = [1 4 6 2 5 7 8 3]; Q = zeros(size(P)); Q(circshift(P, -1)) = P P = [22, 35, 17, 9, 11, 23, 56, 43, 25, 19, 26, 15, 28, 30...

etwa 5 Jahre vor | 0

| akzeptiert

Beantwortet
how can i dowenload r2016b
Please contact the Matlab sales team. As far as I know, you can get trial versions of the newest version only, but MathWoorks m...

etwa 5 Jahre vor | 0

Beantwortet
error: Index exceeds the number of array elements (1).
Do not use the name "sum" for a variable. Avterwards the function with the same name is shadowed: clear sum sum(1:10) % wor...

etwa 5 Jahre vor | 0

Beantwortet
How to handle a large binary vector?
UINT8 oder Logical use 1 byte per value. 225 MB are usually fine. You can store the bits packed in UINT8 also, but this is harde...

etwa 5 Jahre vor | 0

Beantwortet
I am trying to create an array h of size 1001 which can store value of 2 integrals
gl=10; gr=10; N=1000; L=10; l=10; syms x; i = 1; f = gl * (7 / 44) * (exp((-1 * (L-N) * i) / (N * l * cos(x)))); B = vpa...

etwa 5 Jahre vor | 1

| akzeptiert

Beantwortet
"Unrecognized function or variable 'filename'. Error in audioread (line 82) filename = convertStringsToChars(filename);'
A very bold guess: Are you working with admin privileges? Did you open the file audioread.m and overwrite the first line of cod...

etwa 5 Jahre vor | 0

Beantwortet
How can I get image file in web app?
You are not the only person with this problem. See: https://www.mathworks.com/matlabcentral/answers/884084-problems-with-uigetfi...

etwa 5 Jahre vor | 1

| akzeptiert

Beantwortet
generate a sine and cosine wave with 4 cycles .
0:1:3 is [0,1,2,3]. This is less than 4 cycles. 4 cycles mean: x = 0:0.1:8*pi stem() is working. plot(x,y, '.') is an option a...

etwa 5 Jahre vor | 0

| akzeptiert

Beantwortet
matlab percentage always showing zero
After: p = p ./ numel(I), sum(p) is not 1.0, but 0.333. You do not want to divide by numel(I), but by numel(Red), or equivalentl...

etwa 5 Jahre vor | 0

| akzeptiert

Beantwortet
How to pre-allocate a matrix (from cell) when dimensions change
Simplify C=cell2mat(B(r)); to C = B{r}; This creates a cheap shared data copy, so C does not occupy additional memory: it re...

etwa 5 Jahre vor | 0

Beantwortet
Element wise cell division
S{i,j} ./ (S{i,j} - V{i,j}) = 1 ./ (1 - V{i,j} ./ S{i,j}) and for all V and S the division V ./ S replies the elements -6.

etwa 5 Jahre vor | 1

Beantwortet
"Unrecognized function or variable 'filename'. Error in audioread (line 82) filename = convertStringsToChars(filename);'
Your variable "info" is a struct, not a char vector or string. info = audioinfo('Off of Newton Exit 17.wav'); [Y, FS] = aud...

etwa 5 Jahre vor | 0

Beantwortet
plz help how can repetition rows matrix
a = [1 0 0; 0 0 1; 0 1 0]; rows = size(a, 1); n = 5; index = rem(0:n-1, rows) + 1 b = a(index, :)

etwa 5 Jahre vor | 0

| akzeptiert

Beantwortet
Creating Matrix provided elements
A = rand(4) + 1i * rand(4); A = A + A'; % Hermitian % Convert to vector: D = diag(A).'; L = triu(A, 1); Lf = L(L ~= 0...

etwa 5 Jahre vor | 1

| akzeptiert

Beantwortet
If statement in a for loop
The if Commadn needs a scalar condition. Because NewDist(:) < 1 is a vector, Matlab inserts an all() automatically. So your code...

etwa 5 Jahre vor | 1

| akzeptiert

Beantwortet
check ismember for each element individually
You want to get a logical vector for each element, which is TRUE for the matching elements. Then this is efficient: a = [1 2 3 ...

etwa 5 Jahre vor | 0

| akzeptiert

Beantwortet
How do I run a custom function when my toolbox gets installed?
How is the toolbox "regularly distributed"? It is usual, that a toolbox or software has a "configure" function to set up the en...

etwa 5 Jahre vor | 0

Beantwortet
how to implement this in a better way or what is the mistake
Use the debugger: dbstop if error Run your code afterwards until Matlab stops at the error. Then check: size((xs-X)/r) size(...

etwa 5 Jahre vor | 0

Beantwortet
Applying 'if' condition within location-dependent thermal Properties
After defining ro_ult = @(location,state) ro_d-(ro_d-ro_s)*exp(location.y/0.06); ro_ult is a function handle, which expects tw...

etwa 5 Jahre vor | 0

Beantwortet
add different number of zeros in the beginning of a matrix
The output cannot be a matrix, as Dyuman Joshi told you already, because in a matrix all rows must have the same number of eleme...

etwa 5 Jahre vor | 1

Mehr laden