A répondu
how to save matlab output data in excel?
Write the transpose of the matrix (so you'll have 100000 rows and 4 columns): writematrix(Received_Signal.','ExampleMatlab....

10 jours il y a | 0

| A accepté

A répondu
is there a way to make the 0 x and y axis bold?
You can use xline and yline. % Given data points x = [-0.1, 0, 0.2, 0.3]; y = [5.3, 2, 3.19, 1]; % Define the range of x v...

10 jours il y a | 0

A répondu
why the plot are all zeros?
Here a few things I notice that don't make sense to me. Coincidentally, each of them gives a condition that is always false, and...

11 jours il y a | 0

A répondu
Import .file values
unzip file.zip ls *.file str = fileread('file.file') C = regexp(str,'([^\r\n]+)\d{2}{''y'':(.+?), ''x'':(.+?), ''z'':(.+?...

11 jours il y a | 0

| A accepté

A répondu
Subtract first and last value of each cell array in a cell
F = @(x)x(1)-x(end); result = cellfun(F,C); where C is your cell array. Note that since the diffrerence between first and last...

12 jours il y a | 1

| A accepté

A répondu
How do I save vector values from for loop?
az = 0:90:270; rR = 0:0.1:1; % pull rR out of the loop (it never changes) N = numel(az); Lc = zeros(numel(rR),N); % make Lc...

12 jours il y a | 0

| A accepté

A répondu
Bar Graph Categorisation and Coloring Issue
It's more convenient to put Cat1, Cat2, etc., into a matrix with 8 rows to form y_values, rather than one long row vector, becau...

12 jours il y a | 0

| A accepté

A répondu
I can't see the cosine graph. How do I generate the cosine graph using 2^10 samples?
for i=1: nsamples ydata(i,:)=[5+10*cos(2*pi*time+pi/6)]; end That calculates 5+10*cos(2*pi*time+pi/6) and assigns it to t...

12 jours il y a | 0

A répondu
How to draw the letter phi on matlab?
x = 0.4; y = 0.3; text(x,y,'\phi')

12 jours il y a | 0

A répondu
Cannot run with provided input arguments
Not enough inputs are given to updateGraph; it expects selectedLabel to be given, but it's not. How are you calling updateGraph...

12 jours il y a | 0

A répondu
normal distributed numbers around a specific value
See the following: https://www.mathworks.com/help/matlab/ref/randn.html https://www.mathworks.com/help/matlab/math/random-numb...

12 jours il y a | 0

A répondu
Read a matrix with symbolic variables
filename = 'matrix.txt'; M = str2sym(split(readlines(filename),','))

12 jours il y a | 0

| A accepté

A répondu
Obtaining a scalar value from a vector output
% take a look at what enzymeGeneral.m is type enzymeGeneral.m If you want enzymeGeneral to return the F and G it calculates, c...

12 jours il y a | 1

| A accepté

A répondu
Power function fitting graph: problem with tiledlayout
format long g C1=[5e-3 2e-4 5e-5 1.25e-5]'; C2=[5e-3 2e-4 5e-5 1.25e-5 3e-6]'; l3070=[1703.125 37875 68893.75 69006.25]'; l7...

12 jours il y a | 0

| A accepté

A répondu
File: myFact.m Line: 11 Column: 1. This statement is not inside any function.
If the first executable line of code (that is, the first line that's not a comment) in an m-file is a function declaration, then...

13 jours il y a | 0

| A accepté

A répondu
This statement is not inside any function.
If the first executable line of code (that is, the first line that's not a comment) in an m-file is a function declaration, then...

13 jours il y a | 0

| A accepté

A répondu
How to create for loop for calculating euclidean distance of a matrix?
Something like what follows might be what you're trying to do (I'm assuming config.Calculated.Coordinates is the same as Coordin...

13 jours il y a | 0

| A accepté

A répondu
Number of counts in matrix
You can use nnz. Example: A = [1 1 2; 2 1 2; 3 1 1] nnz(A == 1) % number of times 1 appears in A nnz(A == 2) % number of tim...

13 jours il y a | 0

| A accepté

A répondu
Matlab Legend Function dose not work at all
You have a variable called legend in your workspace interfering with you calling the legend function. Run clear legend to cle...

13 jours il y a | 0

A répondu
How can I update plots in a GUI from a background data queue?
"You can see that my callback function for the afterEach command accepts TWO inputs" That's not really true. This anonymous fun...

13 jours il y a | 0

| A accepté

A répondu
How can I link all the solutions (link between the blue lines)?
One way is to collect all the points to be plotted into two matrices, one for x-coordinates and one for y-coordinates, remove th...

13 jours il y a | 0

| A accepté

A répondu
Plot two graphs on the same plot in gui and create two axis in the same plot
Do you want two lines in one axes, or one line in each of two axes? If two lines in one axes, it looks like you already have th...

13 jours il y a | 0

A répondu
Exponentially Weighted Moving Average (EWMA)
Here's how you can perform the calculations you've listed: % given: a = 0.3; x = [0.15 0.11 0.11 0.1 0.09 0.12 0.11 0.09]; ...

13 jours il y a | 0

A répondu
How to position a geoaxes figure within a uifigure
Default geoaxes Units are normalized (see here), which means that a Position of [100 100 500 500] places the geoaxes' lower left...

14 jours il y a | 0

A répondu
Plotted patch changes size
"some patches don't reach the top of the plot or the bottom of it ... I set patches according to yLimits ... Any idea what coul...

14 jours il y a | 1

A répondu
Im trying to create an air hockey game in which both of the blockers are player controlled.
It should be feasible. Refer to the following code for one way you can control two different objects via a single key press func...

14 jours il y a | 0

A répondu
How can I vectorize my code?
Vectorizing involves using element-wise operations (a.k.a. array operations), e.g., .*, ./, .^, rather than matrix operations, e...

14 jours il y a | 0

| A accepté

A répondu
Importing a .csv file
Here's one way you can try to fix that file: f_in = 'data.csv'; f_out = 'data_modified.csv'; % show the original file's con...

14 jours il y a | 0

A répondu
Index exceeds the number of array elements. Index must not exceed 2. ylim
You have a variable called ylim in your workspace which is preventing you from calling the built-in ylim function. Clear it cle...

14 jours il y a | 0

| A accepté

A répondu
Graphing partial sums of a series
In your expression for S1: S1 = S1 + (2*((1/2*n-1)*(sin((2*n-1)*(x))))-2*((1/2*n)*(sin((2*n)*(x))))); You need parentheses aro...

14 jours il y a | 1

| A accepté

Charger plus