回答済み
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...

約2年 前 | 0

回答済み
Read a matrix with symbolic variables
filename = 'matrix.txt'; M = str2sym(split(readlines(filename),','))

約2年 前 | 0

| 採用済み

回答済み
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...

約2年 前 | 1

| 採用済み

回答済み
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...

約2年 前 | 0

| 採用済み

回答済み
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...

約2年 前 | 0

| 採用済み

回答済み
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...

約2年 前 | 0

| 採用済み

回答済み
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...

約2年 前 | 0

| 採用済み

回答済み
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...

約2年 前 | 0

| 採用済み

回答済み
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...

約2年 前 | 0

回答済み
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...

約2年 前 | 0

| 採用済み

回答済み
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...

約2年 前 | 0

| 採用済み

回答済み
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...

約2年 前 | 0

回答済み
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]; ...

約2年 前 | 0

回答済み
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...

約2年 前 | 0

回答済み
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...

約2年 前 | 1

回答済み
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...

約2年 前 | 0

回答済み
How can I vectorize my code?
Vectorizing involves using element-wise operations (a.k.a. array operations), e.g., .*, ./, .^, rather than matrix operations, e...

約2年 前 | 0

| 採用済み

回答済み
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...

約2年 前 | 0

回答済み
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...

約2年 前 | 0

| 採用済み

回答済み
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...

約2年 前 | 1

| 採用済み

回答済み
Zoom in on a particular part of the plot with circular view
Some examples of doing that can be found in the following: https://www.mathworks.com/matlabcentral/answers/60376-how-to-make-an...

約2年 前 | 0

回答済み
Color bar range color
The easiest way to do that is to use geoscatter, which allows you to specify colors as indices into the colormap. See this line ...

約2年 前 | 0

回答済み
How to give call back function in app design using MATLAB.
Since the editfield for number of boxes and the enter button for getting dynamic input boxes are created programmatically, speci...

約2年 前 | 1

回答済み
How to color values in corrplot function?
Here's one way: load fisheriris [~,~,h] = corrplot(meas); g = findgroups(species); idx1 = find(g == 1); idx2 = find(g == 2...

約2年 前 | 1

回答済み
How to interpolate vector data sets using interp2()
You can't use interp2 with those vectors because they don't define a grid. You can use scatteredInterpolant instead. x = [800; ...

約2年 前 | 0

| 採用済み

回答済み
I want to calculate the average of cell array matrix
If I understand the question, you can do: B = cellfun(@(x)mean(x,'all'),A,'UniformOutput',false); Example: A = {zeros(5),magi...

約2年 前 | 1

| 採用済み

回答済み
How can I have a user choose between two functions to run?
Here are a few options: <https://www.mathworks.com/help/matlab/ref/questdlg.html questdlg>, <https://www.mathworks.com/help/matl...

約2年 前 | 0

回答済み
Error creating a new type of fit using fittype.
There is an extra open parenthesis at the front (or a close parenthesis is missing at the end): r+(((a*(x^b))/(t^b+x^b)) ...

約2年 前 | 0

| 採用済み

回答済み
Weird results while coding using an m-file
This is an effect of floating-point arithmetic. Related: https://www.mathworks.com/matlabcentral/answers/57444-why-is-0-3-0-2-0...

約2年 前 | 0

回答済み
Update a 3D graph without resetting viewpoint?
Yes. You can store the axes view and later restore it to the stored value after updating the plot. See view. Alternatively, upd...

約2年 前 | 0

さらに読み込む