Beantwortet

How to use subplot in a UIFIGURE?

When you post a question that states that you are getting error(s), you should post the complete text of the error message (ever...

How to use subplot in a UIFIGURE?

When you post a question that states that you are getting error(s), you should post the complete text of the error message (ever...

3 Monate vor | 0

Beantwortet

Text in editor window suddenly vanishes in R2022b.

I would definitely do a SaveAs to another filename in case the data is still there but just not showing. Use a different filena...

Text in editor window suddenly vanishes in R2022b.

I would definitely do a SaveAs to another filename in case the data is still there but just not showing. Use a different filena...

3 Monate vor | 0

Beantwortet

Remove text after a symbol

If the titles are character vectors in a cell array: titles = ... { 'Bohemian Rhapsody - Remastered 2011' '(I Can''...

Remove text after a symbol

If the titles are character vectors in a cell array: titles = ... { 'Bohemian Rhapsody - Remastered 2011' '(I Can''...

3 Monate vor | 0

| akzeptiert

Beantwortet

How to permanently disable warnings in MATLAB editor?

I believe you can do that by un-checking the "Enable integrated warning and error messages" checkbox under the Code Analyzer opt...

How to permanently disable warnings in MATLAB editor?

I believe you can do that by un-checking the "Enable integrated warning and error messages" checkbox under the Code Analyzer opt...

3 Monate vor | 0

| akzeptiert

Beantwortet

Cumulative distance vs time graph using a velocity vs time graph

You need to save the value of integ on each step of the integration. See changes below marked with % <<< clc; clear; close; ...

Cumulative distance vs time graph using a velocity vs time graph

You need to save the value of integ on each step of the integration. See changes below marked with % <<< clc; clear; close; ...

3 Monate vor | 0

| akzeptiert

Beantwortet

how to get the same result using rand

The documentation for rand states that it returns values "drawn from the uniform distribution in the interval (0,1)". If you wa...

how to get the same result using rand

The documentation for rand states that it returns values "drawn from the uniform distribution in the interval (0,1)". If you wa...

3 Monate vor | 2

Beantwortet

How do I replace one data column from a text file to the data column of another text file

rch = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1175438/outputrch.txt', ... 'HeaderLines', ...

How do I replace one data column from a text file to the data column of another text file

rch = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1175438/outputrch.txt', ... 'HeaderLines', ...

3 Monate vor | 0

Beantwortet

sum of time series performace

Your question isn't very clear but it appears that perhaps you want to do a moving average. Take a look at the documentation fo...

sum of time series performace

Your question isn't very clear but it appears that perhaps you want to do a moving average. Take a look at the documentation fo...

4 Monate vor | 1

Beantwortet

Reading in a text file with numbers and strings in

Try using readtable instead of readmatrix. This will read in the strings properly and allow you to do your cleanup based on the...

Reading in a text file with numbers and strings in

Try using readtable instead of readmatrix. This will read in the strings properly and allow you to do your cleanup based on the...

4 Monate vor | 0

Beantwortet

Extract numbers from char type

Or, in one line of code: s = '4.64 km'; num = sscanf(s, '%f') % num will be a double

Extract numbers from char type

Or, in one line of code: s = '4.64 km'; num = sscanf(s, '%f') % num will be a double

4 Monate vor | 0

Beantwortet

Hold a value indefinitely once a condition becomes true

One way would be to route the output of the relational operator to two places: (1) a summing junction or an OR block, and (2) a...

Hold a value indefinitely once a condition becomes true

One way would be to route the output of the relational operator to two places: (1) a summing junction or an OR block, and (2) a...

4 Monate vor | 0

Beantwortet

How to have Logging in Matlab

Perhaps the diary command will do what you need. An excerpt from the documentation linked above: When logging is on, MATLAB® c...

How to have Logging in Matlab

Perhaps the diary command will do what you need. An excerpt from the documentation linked above: When logging is on, MATLAB® c...

4 Monate vor | 0

| akzeptiert

Beantwortet

Plotting patters using circles and a trignometric equation

k = 1:14000; a = pi*k./14000; Xk = cos(10*a).*(1-0.5*cos(16*a).^2); Yk = sin(10*a).*(1-0.5*cos(16*a).^2); Rk = 1/200 + 0...

Plotting patters using circles and a trignometric equation

k = 1:14000; a = pi*k./14000; Xk = cos(10*a).*(1-0.5*cos(16*a).^2); Yk = sin(10*a).*(1-0.5*cos(16*a).^2); Rk = 1/200 + 0...

4 Monate vor | 1

| akzeptiert

Beantwortet

How to remove comma from numerical data

Copy this text and paste it into a text editor. Then search and replace all of the commas with nothing. Then run that modified...

How to remove comma from numerical data

Copy this text and paste it into a text editor. Then search and replace all of the commas with nothing. Then run that modified...

4 Monate vor | 0

Beantwortet

How to use data in a script from a function in another.

% Example script NewBricks = UseBrickData(); % Call the function and assign the return value to the variable NewBricks disp(Ne...

How to use data in a script from a function in another.

% Example script NewBricks = UseBrickData(); % Call the function and assign the return value to the variable NewBricks disp(Ne...

4 Monate vor | 0

Beantwortet

How to view an mlx file without using MATLAB

You can "Save as..." an mlx file to pdf, docx, html, or latex but you lose the interactivity. You will get a static "snapshot" ...

How to view an mlx file without using MATLAB

You can "Save as..." an mlx file to pdf, docx, html, or latex but you lose the interactivity. You will get a static "snapshot" ...

4 Monate vor | 1

Beantwortet

How schould the matlab function be to hold an signal between two values?

Perhaps something like this in a MATLAB Function block? function out = determineStatus(in) persistent out if isempty(out) ...

How schould the matlab function be to hold an signal between two values?

Perhaps something like this in a MATLAB Function block? function out = determineStatus(in) persistent out if isempty(out) ...

4 Monate vor | 1

| akzeptiert

Beantwortet

How can I set x ticks for every curve in the subplot, legend for every curve and a title for the whole figure?

It looks like it works just fine except for the legend. Instead of legstr= "\theta_1_/_2 = "+(5)+"°"; try this legstr= "\th...

How can I set x ticks for every curve in the subplot, legend for every curve and a title for the whole figure?

It looks like it works just fine except for the legend. Instead of legstr= "\theta_1_/_2 = "+(5)+"°"; try this legstr= "\th...

4 Monate vor | 0

| akzeptiert

Beantwortet

Automatic change of legend's arguments

labels = {'A','B','C'}; for i = [1 3] h(i) = plot(rand(10,1), 'DisplayName', labels{i}); hold on end grid on legen...

Automatic change of legend's arguments

labels = {'A','B','C'}; for i = [1 3] h(i) = plot(rand(10,1), 'DisplayName', labels{i}); hold on end grid on legen...

4 Monate vor | 1

| akzeptiert

Beantwortet

How to adjust the position of the x-axis ticks and put the angle degree on the values of the x-axis ticks?

Vec_MIS = [0.238000000000000,1.18980000000000,2.14160000000000,4.99700000000000,6.90070000000000,10.7079000000000,14.51520000000...

How to adjust the position of the x-axis ticks and put the angle degree on the values of the x-axis ticks?

Vec_MIS = [0.238000000000000,1.18980000000000,2.14160000000000,4.99700000000000,6.90070000000000,10.7079000000000,14.51520000000...

4 Monate vor | 0

| akzeptiert

Beantwortet

Generate a sinus signal and plot the output

Your tmax is huge so you are plotting many many thousands of cycles. Also, stem clutters up the plot with circles on every data...

Generate a sinus signal and plot the output

Your tmax is huge so you are plotting many many thousands of cycles. Also, stem clutters up the plot with circles on every data...

4 Monate vor | 0

| akzeptiert

Beantwortet

How do you change the transparency of multiple lines using "plot" if the lines are all different colors?

h = plot(rand(5)); % example plot. When you make your plot be sure to capture the handle % now set the alpha on all the lines ...

How do you change the transparency of multiple lines using "plot" if the lines are all different colors?

h = plot(rand(5)); % example plot. When you make your plot be sure to capture the handle % now set the alpha on all the lines ...

4 Monate vor | 0

Beantwortet

Rounding towards zero or from zero

There is no tie involved in rounding 3.6. If you wish, you can use floor instead: floor(3.6) If x was 3.5 instead, that would...

Rounding towards zero or from zero

There is no tie involved in rounding 3.6. If you wish, you can use floor instead: floor(3.6) If x was 3.5 instead, that would...

4 Monate vor | 0

| akzeptiert

Beantwortet

Is it possible to have a file that changes it name depending on another variable?

Try this: % Button pushed function: SaveButton function SaveButtonPushed(app, event) PatientID = app.PatientI...

Is it possible to have a file that changes it name depending on another variable?

Try this: % Button pushed function: SaveButton function SaveButtonPushed(app, event) PatientID = app.PatientI...

5 Monate vor | 1

| akzeptiert

Beantwortet

Condense code in Split string operation

If you put the filename in a string instead of a char vector you can do it in one line s = "xxx_yyy_zzz.xlsx" extractBetween(s...

Condense code in Split string operation

If you put the filename in a string instead of a char vector you can do it in one line s = "xxx_yyy_zzz.xlsx" extractBetween(s...

5 Monate vor | 1

Beantwortet

increasing amplitude of sine wave

Fs = 44100; dt = 1/Fs; StopTime = 3; t = (0:dt:StopTime-dt)'; Fc = 3000; A = linspace(0, 1, numel(t))'; y = A.*sin(2*pi*Fc...

increasing amplitude of sine wave

Fs = 44100; dt = 1/Fs; StopTime = 3; t = (0:dt:StopTime-dt)'; Fc = 3000; A = linspace(0, 1, numel(t))'; y = A.*sin(2*pi*Fc...

5 Monate vor | 0

| akzeptiert

Beantwortet

How to search for previous values in a table?

This should do what you want. Note that the cell array in this case only has one cell because there are only two timestamp rows...

How to search for previous values in a table?

This should do what you want. Note that the cell array in this case only has one cell because there are only two timestamp rows...

5 Monate vor | 0

| akzeptiert

Beantwortet

Match two variables list

Perhaps what you want is this: c = ["80ms,110ms", "110ms,140ms", "140ms,195ms", "195ms,250ms", "250ms,400ms", "400ms,550ms", "5...

Match two variables list

Perhaps what you want is this: c = ["80ms,110ms", "110ms,140ms", "140ms,195ms", "195ms,250ms", "250ms,400ms", "400ms,550ms", "5...

6 Monate vor | 0

Beantwortet

Formatting a vector to not include the first value

It seems like you could benefit from taking this introduction to using Matlab: Matlab onramp This is an example of very basic ...

Formatting a vector to not include the first value

It seems like you could benefit from taking this introduction to using Matlab: Matlab onramp This is an example of very basic ...

6 Monate vor | 0

| akzeptiert

Beantwortet

Using plot handle to replot a graph

Read the documentation for the copyobj function. Here is an example: x = 0:0.1:10; y = [sin(x);cos(x);tan(x)]; for i = 1:3; ...

Using plot handle to replot a graph

Read the documentation for the copyobj function. Here is an example: x = 0:0.1:10; y = [sin(x);cos(x);tan(x)]; for i = 1:3; ...

6 Monate vor | 1

| akzeptiert