Réponse apportée
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 ...

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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 ...

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 2

Réponse apportée
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...

plus de 4 ans il y a | 0

Réponse apportée
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, ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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'...

plus de 4 ans il y a | 0

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

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

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

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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 {} ...

plus de 4 ans il y a | 1

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 3

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 4 ans il y a | 1

Charger plus