Beantwortet
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 ...

mehr als 4 Jahre vor | 0

Beantwortet
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...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

Beantwortet
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...

mehr als 4 Jahre vor | 0

Beantwortet
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...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
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 ...

mehr als 4 Jahre vor | 0

Beantwortet
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...

mehr als 4 Jahre vor | 2

Beantwortet
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...

mehr als 4 Jahre vor | 0

Beantwortet
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, ...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

mehr als 4 Jahre vor | 0

Beantwortet
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...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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'...

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

| akzeptiert

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

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
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 {} ...

mehr als 4 Jahre vor | 1

Beantwortet
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...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 3

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

mehr als 4 Jahre vor | 1

Mehr laden