Answered
Color quadrant of ellipse
To generate something like the plot shared in your comment, you can plot with specified colors and markers: a = 2; b = 1; c =...

2 years ago | 1

| accepted

Answered
Color quadrant of ellipse
Use patch. Example: a = 2; b = 1; c = [0 0]; Npts = 101; % must have mod(Npts,4)==1 for this to work right t = linspace(...

2 years ago | 0

Answered
Need help with fprintf within a loop.
for i=2:216 n_b=o_b+(o_b*0.005)+m_c; fprintf("Month %d = $%.2f \n", i, n_b); end

2 years ago | 1

| accepted

Answered
question related with 8-PSK modulation
With M = 8, you have log2(M) == 3 bits per symbol. Later you generate 1000 bits, but this is not an integer number of symbols at...

2 years ago | 1

| accepted

Answered
findobj not working with UIAxis
The 'Type' and the class of something are two different things. The value of the uiaxes 'Type' property is 'axes', so axesInT...

2 years ago | 0

Answered
Why is matlab printing all number of digit.
"why [is] matlab displaying all the number of digits on the y axis[?]" Because the range of the y-limits is very small, about 3...

2 years ago | 0

Answered
How to ignore special characters and retrieve the data prior to the character
The following code replaces any * or # characters in a text file with spaces (note that this replaces the existing file with a n...

2 years ago | 0

| accepted

Answered
Does this plot look right?
It is ok. You can see more clearly that the signal has content only at 1Hz by using a stem plot: % Define the time vector Fs =...

2 years ago | 0

Answered
How to do this below?
One way: a = [0 0 1 1 1 0 0 1 1 1 1 0 0 0] b = zeros(1,numel(a)); s_idx = strfind([0 a],[0 1]); e_idx = strfind([a 0],[1 0...

2 years ago | 0

| accepted

Answered
How to use freqz to plot the frequency response from neg frequency to pos frequency
Here's one way: f_sampling = 40e3; % sampling frquency f_pass = 10e3; % pass-band frequency f_stop = 15e3; % stop-band freque...

2 years ago | 0

Answered
Fill the graph with legend
num_simulations = 1000; %Common parameters Discount_Rate_min = 0.06; % assume 6-8% Discount_Rate_max = 0.08; Discoun...

2 years ago | 0

Answered
how to set a range of a scatterplot in matlab app designer?
scatter(app.UIAxes, X, Y, 'filled') app.UIAxes.YLim = [0 500];

2 years ago | 0

Answered
plot area between 2 curves, not working
There is a NaN in each of curve1 and curve2. NaNs make patches unrenderable, so you need to remove the NaNs or replace them with...

2 years ago | 0

Answered
getting error unrecognized method property or field
The code says L_Active = app.RelativeLigandConcentrationActivetoEC50EditField.Value; but that component is called ...

2 years ago | 0

| accepted

Answered
Excel to timetable, problem with datetime
Change the InputFormat to "''dd-MMM-yyyy''" to match what's in the files. unzip('Excel Data.zip') sheetnames = {'189x', '190...

2 years ago | 0

Answered
Trying to set up a matrix, getting error message
Check the size of Matrix. You may be able to use a different function to read your file, e.g., readmatrix instead of fopen/fsca...

2 years ago | 0

| accepted

Answered
Variable precision point for fprintf command set by user input
Here's what the documentation for fprintf has to say about this: "When you specify * as the field precision operator, the other...

2 years ago | 1

Answered
How can solve this error when using phased.CFAR, please? ("Error using step Expected Idx to be an array with all of the values <= 1)
If you pass to cfar a column vector as the first argument, then it runs without error: clc;clear;clf fs = 500e9; % sampling fr...

2 years ago | 0

| accepted

Answered
How to plot an array in 3D?
"I would like to plot it each line on a separate axis number and all lines on the z-axis, like a 3D plot, but based on this 2D a...

2 years ago | 0

Answered
How do I put a variable input inside a char vector?
CarNumber = input('Please enter the car number: '); fprintf('Car number %d is driving the fastest\n', CarNumber);

2 years ago | 0

| accepted

Answered
surface and plot3 linking edges that should not be linked on the plot
SystemLearning = readtable('SystemLearning.csv','VariableNamingRule','preserve'); x = SystemLearning{:,1}; y = SystemLearnin...

2 years ago | 0

| accepted

Answered
area between a curve and a linear function
y_downwards_limit = linspace(gerade_punkt2(1),gerade_punkt2(2),numel(Temparea)).'; area_between_curves = trapz(Temparea, DSCa...

2 years ago | 1

Answered
confirm valid file identifier before flcose?
try fclose(fid); catch % file already closed, do nothing end

2 years ago | 0

Answered
How to get graphics array content App Designed
strcmp(get(ParentPanel.Children,'Type'),'uipanel')

2 years ago | 0

| accepted

Answered
error in creating function
plot(x,hw2_part1d(x),'k-');grid;hold on % ^^^ call the function with x as input

2 years ago | 0

| accepted

Answered
transition probability matrix and for loop
transMatRD = cell(5); % 5x5 cell array for i=1:25 transMatRD{i} = transprob(...) end

2 years ago | 0

| accepted

Answered
Push Buttons are not working properly when more than two axes are added to the created app in app designer.
@Muhammad Sagheer: I think I see the problem you are talking about now: after 40 or so iterations, if you click pause, the code ...

2 years ago | 0

Answered
How to scatter in a grid ?
https://www.mathworks.com/help/matlab/ref/histcounts2.html

2 years ago | 1

| accepted

Answered
How to select non-string variables convertvars( ) argument?
c = {1,2,3;'a','b','c'; "d", "e", "f"}' t = cell2table(c) convertvars(t, @(x)~isstring(x), 'string')

2 years ago | 1

| accepted

Answered
Turning string into a variable name for a function to use
I understand that f2load(ci) is a string, and you want to refer to the table variable whose name is that string. One way to do ...

2 years ago | 0

| accepted

Load more