Answered
How to draw low and high frequency boundaries/regions in a Bode plot?
if you are calling bode() to do the plotting, then although it is technically possible (if I recall correctly), it is not recomm...

4 years ago | 0

| accepted

Answered
Evaluate values of a vector with values of variable p
eval() of a symbolic expression is not defined. Use subs() and double()

4 years ago | 0

| accepted

Answered
Matlab Coder: doesn't support fields() function
No there is not. You cannot create or use dynamic fields in generated code. C and C++ do not have dynamic structure field names....

4 years ago | 0

Answered
Changing significant digits of constant block
Right click the block, "open", and edit the text version of the constant.

4 years ago | 1

Answered
import a symbolic expression to simulink and plot it
There is no possibility of doing that. Symbolic expressions are not valid Simulink signals. If you matlabFunction() the expre...

4 years ago | 0

| accepted

Answered
How can I solve this eqn
Assuming that you want the third to be F(3) then there is no solution over reals. With the symbolic toolbox you can solve() t...

4 years ago | 0

Answered
Why I got a waring
You write to F(2) twice. The warning is because the default algorithm requires square outputs from your function, such as 1x1...

4 years ago | 0

Answered
Which one is the right answer, sum(w(:)) or sum(sum(w))?
For sum(sum) and sum((:)) and sum('all'), provided that the array is large enough, one or more calls will be made to a high spee...

4 years ago | 0

| accepted

Answered
How to define a function with summation.
you cannot assume that the function handle refers to vectorized code, so you need to somehow invoke f on each of the integers 1 ...

4 years ago | 0

| accepted

Answered
Displaying sum on plot
You can text() it into place. Or you could title() t = "Sum of squares: " + TheSum; title(t)

4 years ago | 0

Answered
Is it possible to generate dynamic text in Matlab Live Script notebooks?
It is possible, but it is messy and not supported at all. I would not recommend it. First create your mlx file. Now, unzip() t...

4 years ago | 0

Answered
matrix math problems , error in matrix size
xx = rand(18,3); NU = rand(18,1); try xx/NU fprintf('/ worked\n'); catch ME fprintf('well, / did not work\n');...

4 years ago | 0

Answered
How to change textscan to fscanf?
You need a completely different implementation. fopen() the file. Then, repeatedly fgetl() one line. Check if the line begins ...

4 years ago | 0

| accepted

Answered
I keep getting "Array indices must be positive integers or logical values". error
L = 0.05; Not an integer. Vx1(0:(L/2)-1)=1; L/2 is 0.05/2 which is 0.025 . Subtract 1 from that to get -0.975 . So the index ...

4 years ago | 0

| accepted

Answered
Displaying all plots in long code
Generally speaking: in most cases, if you have more than one plotting command on the same axes, such as plot() or scatter() or ...

4 years ago | 0

| accepted

Answered
Variable z must be of size [41 41]. It is currently of size [2 2]. Check where the variable is assigned a value.
The syntax is START:STEP:STOP but you used START:STOP:STEP

4 years ago | 0

Answered
How to use a vector as an input in a function?
inputcell = num2cell(input) ; [AR,DEC] = astrometry(inputcell{:});

4 years ago | 0

Answered
Is there a way to achieve the same result as the xlim, ylim functions using different functions?
xlim and ylim work by setting the XLim and YLim properties of the current axes. There are three major ways of setting propert...

4 years ago | 0

Answered
How to store char to a text file?
fopen the file with 'w' access. fwrite() the character vector. fclose()

4 years ago | 0

Answered
Issue with delete(object)
delete() of objects applies to handle objects, not to value objects. You cannot delete a value object from inside the class.

4 years ago | 0

| accepted

Answered
Arrays from workspace into simulink
You don't. The "From Workspace" block automatically treats the data as a signal, and treats the first column as time. You can co...

4 years ago | 1

| accepted

Answered
defining linewidth in "rfplot"? Is it possible?
If you can do h = rfplot(Thru, 1, 1); then you can do set(h, 'LineWidth', VALUE); If the call to rfplot() is outside of your...

4 years ago | 0

Answered
How to set stopping condition on time in nested for loop?
tic Time = 0; for kk = 1: n some operations for ii = 1:m Time = toc; %you just did some work, you m...

4 years ago | 1

| accepted

Answered
How to note the time of specific output in MATLAB?
neverseen = true(1,10); seenwhen = nan(1,10); tic Time = 0; for ii = 1:n if Time >= 20 break end O...

4 years ago | 1

| accepted

Answered
How to get rid of zeros in a matrix?
k1 = 0.3; k2 = 0.3; k3 = 0.4; k4 = 0.05; k5 = 0.77; k6 = 1.373; k7 = 0.48; k8 = 0.0017; k9 = 0.094; k10 = 3.76; syms a...

4 years ago | 0

| accepted

Answered
Systems with two different execution rates
If what you have is two blocks (or subsystems) both inside the same model, then you could use https://www.mathworks.com/help/sim...

4 years ago | 0

| accepted

Answered
matlab uitable parameters to be used
In that situation, the ui table does not have any name. Depending on what properties were assigned to it, it might possibly have...

4 years ago | 0

Answered
stacked plot of subplots that includes three graphs
subplot(3,1,1) plot(B, [A(:), C(:), D(:)]); subplot(3,1,2) plot(B, [E(:), F(:), D(:)]); subplot(3,1,3) plot(B, [G(:), H(:),...

4 years ago | 0

Answered
1x1 datetime cells into plot
Thethis_Time = [yourCell{:}]; No need to convert to datenum.

4 years ago | 0

| accepted

Answered
How to get the logical index 1 if the cell is missing?
cellfun(@(M) any(ismissing(M)), data) or if you just want to test the one, any(ismissing(data{2,1})) Note that missing is a v...

4 years ago | 0

| accepted

Load more