Answered
How to change the content of file?
filename = 'Document2.txt'; while true Val = load(filename) + 10; if Val > 250; break; end fid = fopen(fi...

3 Tage ago | 0

Answered
How do I save only the final state of ode solver?
use options for plotfcn or outputfcn and have it skip updating the plot unless the iteration number mod n is 0.

3 Tage ago | 1

| accepted

Answered
Check for missing argument or incorrect argument data type in call to function 'scale' .what is the problem and how to correct it? Based on machine learning on ramp course.
https://www.mathworks.com/help/matlab/ref/polyshape.scale.html scale() is not defined for numeric arrays, only for polyshape ...

3 Tage ago | 0

Answered
Matlab system command doesn't work properly on linux platform
https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html You have a BASH_ENV or equivalent for your shell, ...

3 Tage ago | 0

Answered
How to display stacking circle
stack = char(' ' + zeros(max(array),length(array))); stack(ndgrid(max(array):-1:1) <= array) = 'o';

4 Tage ago | 0

Answered
Iterating through each element in a matrix
s = intersect(A, B);

4 Tage ago | 0

| accepted

Answered
How do I detect a "tab" character in a line of text read by fgetl?
S = sprintf('abc\tdef'); %text with a tab in it S == 9 %fast, simple, and tab character unlikely to...

4 Tage ago | 1

Answered
Merge repetitive matrices to Final one
%create test data h1 = complex(rand(3,3), rand(3,3)); h2 = complex(rand(3,3), rand(3,3)); %do the work NR = 10; %number ...

4 Tage ago | 0

| accepted

Answered
Using events function to handle discontinuities in system of differential equations
check = double(floor(y(1)*(4*pi*(10*10^-6)^2)) < 1); % checks if N*A is greater than 1 Avoid coding events as binary. Instead c...

4 Tage ago | 1

| accepted

Answered
Axis exponent not displaying when changing TickLabels
Unfortunately that is automatic, the exponent is shut off when manual tick labels are used. You would need to text() the exponen...

4 Tage ago | 0

| accepted

Answered
Error using syms and subs
Replacement code. It seems likely to me that the other files would also have to be editted . The key changes: everywhere the...

4 Tage ago | 0

| accepted

Answered
How to check if a figure has z-axis data?
My tests show that all axes of type numeric and datetime have ZLim that can be queried, so the presense of ZLim cannot be used t...

4 Tage ago | 1

| accepted

Answered
integral of function definite in piece with multiple variable
P = @(w) integral( @(t) p(t) .* exp(complex(0,-w*t))/sqrt(2*pi),-inf,+inf);

5 Tage ago | 0

Answered
how to make zoom in and out
text objects have different possible FontUnits. All of the possibilities except Normalized relate to physical display size, and ...

5 Tage ago | 0

| accepted

Answered
Asking for filename of excel sheet then using xlsread to display
You need to define the behaviour you want when the user does not enter a valid file name, as in this case. When you do not prov...

5 Tage ago | 0

| accepted

Answered
about strings properties issstrprop
Remove the semi-colon. isstrprop('saraaba123', 'alpha')

5 Tage ago | 0

Answered
'Matrix dimensions must agree' error.
p = 1.225; p2 = [1.225; 0.7364; 0.4135]; num_p2 = length(p2); g = 9.81; s = 845; cd0 = 0.0163; ar = 7.53; e = 0.74; ...

5 Tage ago | 0

| accepted

Answered
Licensing Question (Number of devices)
Each student license can be installed and activated on exactly one host. If you have multiple student licenses, they can be acti...

5 Tage ago | 0

Answered
How can I calculate the first derivative of a vector with respect to a matrix?
syms a [1 2] syms B [2 4] syms C [4 4] x = a*B*C; derivs = arrayfun(@(X) reshape(gradient(X, B(:)),size(B)), x, 'uniform',...

5 Tage ago | 0

| accepted

Answered
pcolor function axes switch
Create a hgtransform group. When you pcolor(), set its Parent to be the hgtransform group. Use makehgtform to build a transform ...

5 Tage ago | 0

Answered
Serial communication with DSP F28377s
is the serial communication between PC and F28377s requires RS 232 cable or not. No. The F28377s has a USB port, so you would u...

5 Tage ago | 1

Answered
Does anyone know why this script isnt working?
from 1 to N from() is a Java Date method that does not expect character vectors '1', 'to', 'and 'N' as inputs. ...

5 Tage ago | 0

Answered
3D matrix and 3d plot in matlab
f1.a0 = -3; %to have **some** value R = 0.003/2; %pipe dia. yy=linspace(-R,R,50); xx=yy; d = linspace(0,1,30); %di...

5 Tage ago | 0

Answered
Normalizing 3D coordinates: start in 0,0
A(:, 2:end) = A(:, 2:end) - A(1,1:end) ; This version of the code requires R2016b or later

5 Tage ago | 0

Answered
make a point varies
When A and B are the lower bound and upper bound respectively, then A + rand() * (B-A) will be a random point between the two....

5 Tage ago | 0

Answered
Logical Indexing instead of for (if) loop
In the original code, you are working with one element at a time, which is a scalar, which is a 1 x 1 matrix, which is square. W...

5 Tage ago | 0

| accepted

Answered
Eig() matlab coder output
eigenvectors are not unique; if V is an eigenvector of the matrix, then c*V is also an eigenvector of the matrix, where c is a n...

6 Tage ago | 0

Answered
Sortrows function and real-time systems
sortrows() is based on quicksort. quicksort() does not require that the comparison operation be literally x(idx1) < x(idx2) : q...

6 Tage ago | 1

Answered
Converting image to bits and vice versa
bits = reshape((dec2bin(typecast(YourImage, 'uint8'), 8) - '0').', 1, []); orig_class = class(YourImage); orig_size = size(Y...

6 Tage ago | 0

| accepted

Load more