Beantwortet
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 1-by-15. - can't find what the problem is
Assuming that b, m1, m2, n1, and n2 are scalars, the code runs ok. (Also assuming that the integers stored in the x, y, z variab...

etwa 2 Jahre vor | 0

Beantwortet
Having issues writing matrix to a binary file.
I suspect there's something wrong with how you are reading the file. Here's an example of writing (using your code) and then re...

etwa 2 Jahre vor | 1

Beantwortet
copy subplots within same figure
To copy the legends, copy each with its associated axes (vector of objects to copyobj). To fix the overlapping, set the OuterPo...

etwa 2 Jahre vor | 1

Beantwortet
uigetfile Multiselect option not working for single file select
You don't need separate scipts/functions. Since files is a cell array when multiple files were selected, and files is a charact...

etwa 2 Jahre vor | 1

| akzeptiert

Beantwortet
How to fix this code trying to create 3 seperate plots from a 3D plots exported to png.
The error message Index exceeds the number of array elements (1). on the line copyobj(get(axesHandles(2), 'Children'), ax2); ...

etwa 2 Jahre vor | 1

| akzeptiert

Beantwortet
Why am I receiving this error?
curvatures is of size 2-by-3: curvatures = [0.05, 0.020, 0.0250; 0, 0.010, 0.0125] % Curvatures (kappa_x, kappa_y, kappa_xy) l...

etwa 2 Jahre vor | 0

Beantwortet
I need to make a function for compound interest using for
money=1000; x=zeros(1,8); % x is the balance each year for 8 years x(1) = money; % initially (1st year) x is 1000 for i=2:num...

etwa 2 Jahre vor | 0

Beantwortet
isfield on an app-designer app
Use isprop instead of isfield for checking for the existence of object (including app) properties.

etwa 2 Jahre vor | 0

| akzeptiert

Beantwortet
How to make correct Regex?
Use 'tokens' instead of 'match'.

etwa 2 Jahre vor | 0

Beantwortet
How to cycle through elements in an array in Matlab
To account for indexing in MATLAB starting with 1, subtract 1 from the iteration number, perform mod(), then add 1 to the result...

etwa 2 Jahre vor | 1

Beantwortet
Input command not showing the prompt until answer is put in the command window
The clc in your script is interfering with displaying the first input prompt at the right time. You can get around the problem b...

etwa 2 Jahre vor | 5

| akzeptiert

Beantwortet
How to put textbox in same position of the plots
You asked this question a month ago, and I answered it at that time: <https://www.mathworks.com/matlabcentral/answers/2096466...

etwa 2 Jahre vor | 0

| akzeptiert

Beantwortet
Error message when trying to plot 3D surface plot with colour bar
"'Concentration at Final Time Step'" would seem to indicate that you want to plot a surface from the last page of the 3D array C...

etwa 2 Jahre vor | 0

| akzeptiert

Beantwortet
Is there a way to make msgbox copy-paste?
I don't think there's a way to do that using msgbox, but you can copy text from an 'edit'-style uicontrol, such as is created by...

etwa 2 Jahre vor | 1

Beantwortet
Conditional retime method in a timetable
Maybe something like this: S = load('timetable.mat'); T2 = S.T2; dt = 1; t = seconds(T2.Time); N = round((t(end)-t(1))/...

etwa 2 Jahre vor | 1

| akzeptiert

Beantwortet
Only change ytick fontsize
ax = gca(); ax.YAxis.FontSize = 20;

etwa 2 Jahre vor | 1

| akzeptiert

Beantwortet
How to have individual numbers combine into a larger number
One option is to use the 's' second input to input, which signifies that the user input is returned as a character vector. Then ...

etwa 2 Jahre vor | 0

Beantwortet
Transfer data between App Designer and Matlab (m file)
Scripts run in the workspace they are called from; that may be the base workspace, but in this case it's the workspace of the fu...

etwa 2 Jahre vor | 1

| akzeptiert

Beantwortet
Unable to perform assignment because the left and right sides have a different number of elements(funtion in a while loop).
I don't have the function spere_derive_2d, so I can't run the code, but I guess that spere_derive_2d returns at least 4 outputs,...

etwa 2 Jahre vor | 1

| akzeptiert

Beantwortet
Fitting data to a new set of frequency
You can use interp1. Example follows: % some made-up data defined on those frequency vectors f1 = 1:0.33:34; f2 = 2:0.5:21; ...

etwa 2 Jahre vor | 0

| akzeptiert

Beantwortet
Trying to combine two IR spectra where x is wavenumber (cm-1) and y is transmittance (0 to 1), having trouble.
You'll can interpolate the two spectra onto a common set of wavenumbers. Then you can add the interpolated spectra together. Her...

etwa 2 Jahre vor | 0

Beantwortet
Hello. Just start to learning this program. I have .mat file with many colons and i want to make a plot only from two of them, how can i make it ?
This is presuming that the variable in your mat file is called "Data"; if it's called something else, replace "Data" in the code...

etwa 2 Jahre vor | 0

| akzeptiert

Beantwortet
How to write a program to generate a table of the base-10 logarithms between 1 and 10 in steps of 0.1?
x = (1:0.1:10).'; y = log10(x); T = table(x,y,'VariableNames',{'x','log10(x)'})

etwa 2 Jahre vor | 0

Beantwortet
인덱스가 배열 요소 개수를 초과합니다. 인덱스는 0을(를) 초과해서는 안 됩니다. 오류 해결 방법 있을까요 ?
Assuming data is meant to be a cell array (and using readcell to make it such), adjusting the row indexing to account for the fi...

etwa 2 Jahre vor | 1

Beantwortet
Tornado chart with colormap gradient
jet is a function that takes up to 1 input argument (the number of colors - call it N) and returns a colormap (which is an N-by-...

etwa 2 Jahre vor | 0

Beantwortet
How to append Nested cell array to .csv file
"I have attached the .txt file here which need to be read and written in a new file. Issue is i have 5000 such files which needs...

etwa 2 Jahre vor | 0

Beantwortet
Matrix versus Scalar Input Into Functions Using Symbolic Toolbox
% What it should be qA = A.^2 + 2*A + 15 ; % ^^ element-wise operation

etwa 2 Jahre vor | 1

Beantwortet
Hello everyone! So i am kind of new to MATLAB. I created a UI with tabs, however when i maximise the UI figure, the tabs do not resize along with it. How can i manage this? Thank you in advance.
It seems like having AutoResizeChildren set to 'on' (which is the default) conflicts with positioning children whose Units are '...

etwa 2 Jahre vor | 0

Beantwortet
How to Reshape a Matrix into a Cell
% 821x9 matrix (filled with integers for illustration) M = reshape(1:821*9,9,[]).' % convert to the required cell array C = n...

etwa 2 Jahre vor | 0

Beantwortet
Hello, All. Thank you in advance for any help, contribution and your time. I have been asked to do a contour plot with a data vs time (date and month), the data is like ID.ST
Maybe something like this would work: % read the file into a cell array C = readcell('data.txt'); % make that cell array into...

etwa 2 Jahre vor | 0

Mehr laden