Answered
How do I fix axis labels and numbers?
I think you want your y-axis (which, because of your use of camroll is the horizontal axis) at the bottom. Because MATLAB still ...

7 dagar ago | 0

Answered
Number of elements mismatch.
This seems like you maybe over complicated it? Is it as simple as... x=[1;3;5] fcn(x) function pdot = fcn(pd) pdot=[pd;0...

7 dagar ago | 1

| accepted

Answered
Running several regressions and storing all the data with regress
You're getting this error because you're trying to store the result of bint (which is a 2 x 2 matrix) in a scalar location (tSta...

7 dagar ago | 1

| accepted

Answered
How to remove all zeros in a matrix to use for calculations?
I think your strategy looks good (although you're missing a ( in your example code) Could it be that the values are not exact...

8 dagar ago | 0

Answered
Why do I get "Array indices must be positive integers or logical values"?
You're getting this message because of the line: vt=vf(1-exp(-t/tao)); vf is the number 18, or, more precisely it's a matrix o...

8 dagar ago | 0

Answered
Why do I get "Array indices must be positive integers or logical values"?
You're getting this message because of the line: vt=vf(1-exp(-t/tao)); vf is the number 18, or, more precisely it's a matrix o...

8 dagar ago | 0

Answered
How to save multiple 3x1 matrixes in one big matrix?
How about: f = 100:500; X = nan(length(f),3); A = [2/7, -1.5/6.5, -1/3; 3/7, 2/6.5, -2/3; -6/7, -6/6.5, -2/3]; for i = 1:l...

8 dagar ago | 1

| accepted

Answered
How to plot x and y
There are a couple of options for how you think about this problem. I might do it like this: t = 0:100; % you could just do [0 ...

9 dagar ago | 0

Answered
Can anyone help me with the a tentative guide on how to average across the two dimensions of a 3d array, and loop it across 86 timesteps?
Let's do this with a smaller array, as the specific numbers don't seem particularly important. I'll do 5x4x3 so we can see the v...

9 dagar ago | 2

Answered
Taking input from large excel data stored in multiple sheets based on different variables.
If you look at the documentation for readtable you'll see that you can read a sepcific sheet name from an excel spreadsheet. T...

9 dagar ago | 0

Answered
why do i get '' Error using / Arguments must be numeric, char, or logical.'' for the line where i have f=
You get this error on the line: f = [(1/k)*300*exp(-(( xj - (L/2)).^2))]'; because you're trying to perform the division 1/k, ...

10 dagar ago | 0

| accepted

Answered
How to have grayscale and rainbow color plots in subplots?
You can pass in an axes to the colormap function, and you can get the axes from subplot. Just use the gray colormap for the ones...

10 dagar ago | 0

| accepted

Answered
How to plot this?
You can get an the x and y values for the edges from histcounts2, but that gives you one extra value (you want to tell contour t...

10 dagar ago | 1

| accepted

Answered
Adding elements from a stuck to an array
This might be easier to answer if you provided some example code, as it's a little difficult to follow your description. The ide...

11 dagar ago | 0

| accepted

Answered
Determining whether a table's CustomProperties are 'table' or 'variable'
One strategy here would be to use the output of summary, which returns a struct with a CustomProperties field for each Var, and ...

11 dagar ago | 0

Answered
Struct Field to Matrix large dataset
You can use reshape but you may wish to use permute first to get things in the right order: a=cat(3,[1 2;3 4],[5 6; 7 8]) re...

11 dagar ago | 0

| accepted

Answered
How to resize a subplot copied to a new figure using CopyObj
This is way easier with tiledlayout and nexttile. With subplot, you can't very easily swap axes: you can use the positions of so...

11 dagar ago | 0

| accepted

Answered
I want to draw a transparent sphere with three X Y Z and some curves inside it
How about something like this (I'm including the code to draw some circles around the sphere, a couple of different ways, but I'...

11 dagar ago | 0

Answered
Get listbox into textbox
Here's the modern uifigure/appdesigner style way: u = uifigure; lst = uilistbox(u, 'Multiselect', true, 'Position', [50 50 100...

12 dagar ago | 0

| accepted

Answered
How to assign multiple variables to variables of a class that is in an array without for-loop.
I'm not sure I recommend it, as it's non trivial to read, but I'm pretty sure in this particular case you can do: [instanceOfMy...

18 dagar ago | 0

| accepted

Answered
How can I transpose 2 matrices to show 2 experimental conditions?
You need to give MATLAB some information about where these values should go on the x axis. Here's your orignal plot and then a c...

18 dagar ago | 0

| accepted

Answered
How to get a figure into an axis in app designer?
Normally in MATLAB the hierarchy is Figure - Axes - Chart (plot, bar, scatter, etc.), admittedly the terminology is a little con...

18 dagar ago | 0

| accepted

Answered
How to expand a table with more columns?
You can use the [ ] syntax to concatenate them, just like with a matrix (make sure that they don't share variable names): a=r...

19 dagar ago | 0

| accepted

Answered
Change label size of bounding box
You could use the FontSize Name-Value pair on insertObjectAnnotation: I = insertObjectAnnotation(I,'Rectangle',bboxA,labelsA,'F...

19 dagar ago | 0

| accepted

Answered
Class-Based Unit Tests: Running Specific Methods With Arguments
In your previous question I suggested runtests, but if you look at the other answer @Steven Lord provided a more complex alterna...

19 dagar ago | 1

| accepted

Answered
I am dividing 8bit binary value to two 4 bits values. How not to get "{}" these bars with my output
The function mat2cell converts to a cell array, which is shown with {} and which you can retrieve the values with the same {} ...

19 dagar ago | 1

Answered
Renaming y-axis of stackedplot in MATLAB
(I'm not entirely sure why you're using stackedplot if you only have one plot, you might consider just using 'plot' but...) You...

20 dagar ago | 0

| accepted

Answered
Plotting an average of multiple time series of different length
I think you're saying that you want to resample these all so that they have the same number of samples, then take the average. F...

20 dagar ago | 1

| accepted

Answered
Class-based Unit Tests: Running Specific Methods
You can use runtests for this: runtests({'foo/test_first','foo/test_second'}) % - or - runtests("foo","ProcedureName",["tes...

20 dagar ago | 0

| accepted

Answered
if elseif else statement not working
You're writing "x is greater than c and m" and probably thinking of this as "x is greater than c, and x is greater than m". But ...

20 dagar ago | 1

Load more