답변 있음
How to Shade area between 3 curves each with different x-axis values?
I guess you want to shade the area between the lowest curve and the highest curve for all x. T = readtable('Book1.xlsx') % c...

2년 초과 전 | 1

| 수락됨

답변 있음
How do you search for a number in a cell array containing different length arrays?
C = {[2 5 8 9], [1 2 4 5 7 10], [3 5 6 7 8 9 10], [1 2 3 5 8 9 10], [1 2 4 6 8 9], [1 3 4 5 6 8], [1 2 4], [4 5 7 9], [1 2 5 7 1...

2년 초과 전 | 0

답변 있음
While using "hold on" to create a graph with multiple graphs together, the logarithmic scale on x axis is not applied.
One way to fix this is to set the 'XScale' of the axes to 'log' explicitly. pi_1=[1 1 0.643 0.472 0.371 0.297]'; pi_08=[1 1 0....

2년 초과 전 | 1

| 수락됨

답변 있음
While using "hold on" to create a graph with multiple graphs together, the logarithmic scale on x axis is not applied.
One way to fix this is to put the hold on afer the first semilogx() call. pi_1=[1 1 0.643 0.472 0.371 0.297]'; pi_08=[1 1 0.63...

2년 초과 전 | 0

답변 있음
How to add data to an existing UITable in app designer?
old_data = app.UITable.Data; app.UITable.Data = [old_data; new_data];

2년 초과 전 | 1

답변 있음
Resize and align the data matrix based on the stimuli ID
M = readmatrix('log.csv'); % --- first, identify where the stimuli start and end --- % find indices where 1st column of M ...

2년 초과 전 | 0

| 수락됨

답변 있음
Having trouble encrypting and decrypting messages
Notice that a space character should be encrypted as a space character. The input message you are given has spaces, but the encr...

2년 초과 전 | 0

답변 있음
Function output variable is unrecognized
Calling the function feigR13 with the first input (i.e., the variable num) less than 1 will produce that error because the outer...

2년 초과 전 | 0

답변 있음
How to solve this error?
Use ./ instead of / See https://www.mathworks.com/help/matlab/ref/rdivide.html and https://www.mathworks.com/help/matlab/ref/mr...

2년 초과 전 | 0

답변 있음
split character strings into cell arrays without delimiter
ch = ['AEADHF';'TYESDF'] C = num2cell(ch)

2년 초과 전 | 0

| 수락됨

답변 있음
How can I get these to match
y_echo = echo_gen(data, fs, 0.2, .75); After that line, y_echo is longer than data, as you observe. One way to make them the s...

2년 초과 전 | 0

답변 있음
image grayscale and distortion
In the distortImage function, notice that the code for color images: distorted(1:halfwayRows, 1:halfwayCols, :) = bottomRight; ...

2년 초과 전 | 0

| 수락됨

답변 있음
3D surface plot from only scalars
x = [125, 125, 330, 335, 542.42, 545, 745, 750, 955, 957]; y = [90, -70, 65.983, -50, 55, -38, 40, -20, 30, -12 ]; z1 = [0.05...

2년 초과 전 | 0

답변 있음
How to download multiple files from a website
url = 'https://www.ngdc.noaa.gov/thredds/catalog/global/ETOPO2022/15s/15s_surface_elev_netcdf/catalog.html'; % webread() the ...

2년 초과 전 | 0

| 수락됨

답변 있음
for loop does not iterate
"Please explain to me why i cannot iterate through x_roots." A for loop in MATLAB iterates over the columns of what you give it...

2년 초과 전 | 1

| 수락됨

답변 있음
ginput on tiled layout in app designer
Try setting the HandleVisibility of the uifigure (not the tiledlayout), e.g.: app.UIFigure.HandleVisibility = 'on'; set(...

2년 초과 전 | 0

| 수락됨

답변 있음
Using a string variable as a variable name in an equation.
You can put those vectors into a struct, using their names as fields: Plex_Nms = {'ELEC'; 'FO'; 'HVAC'}; % names ELEC = [...

2년 초과 전 | 0

답변 있음
How to incorporate a push button into GUI so that data indexes from a slider are saved to an array when the push button is clicked
Create a pushbutton, after creating the slider: btn = uicontrol(f, ... 'Style','pushbutton', ... 'String','Mark Heel ...

2년 초과 전 | 1

| 수락됨

답변 있음
How can I obtain char matrix from excel?
filename = 'S5_origin.xlsx'; In R2015a, you can try using readtable to generate a table. Note the resulting table has 215 rows,...

2년 초과 전 | 0

| 수락됨

답변 있음
Save files in different folder based on condition
% define your sub/folder locations, using absolute or relative paths: ok_folder = 'Unflagged_folder'; implement_folder = 'Impl...

2년 초과 전 | 0

| 수락됨

답변 있음
Controlling mouse pointer and responsiveness for the whole window in App Designer
"Is there a way to globally disable/enable all controls ?" Yes. Where f is your uifigure: h = findall(f,'-property','Enable');...

2년 초과 전 | 1

답변 있음
How to make surf plot have different x scales?
% define t,x,W variables: Nx = 11; Nt = 2000; W = (Nx:-1:1).*(Nt:-1:1).'/4500; t = linspace(0,200,Nt); x = linspace(0,1,Nx)...

2년 초과 전 | 0

| 수락됨

답변 있음
Plot control at one figure and two subplots using built-in matlab functions
%% Parameters for the initial normal distribution mu = 101; sigma = 1; %% Number of data points n = 100; % Total number of...

2년 초과 전 | 0

| 수락됨

답변 있음
How do I make a function work?
Your function returns a variable called Kram, but no variable with that name is calculated within the function. I assume you wa...

2년 초과 전 | 1

| 수락됨

답변 있음
Code gets stuck loading when I try to run it.
vChute is negative, so you should be adding it in the calculation of h3, when the rocket is falling % h3 = h2 - vChute * (t3-t2...

2년 초과 전 | 0

답변 있음
Find all possible combinations of numbers with a specific array length
One way: chars = 'ABCD'; n_length = 12; n_chars = numel(chars); result = chars(1+dec2base((0:n_chars^n_length-1),n_chars)-...

2년 초과 전 | 2

| 수락됨

답변 있음
how to import file?
Here's one way: f = [3, 3.1, 3.2, 3.3, 3.4]; Nf = numel(f); C = cell(1,Nf); filenames = compose('%gghs_datafiles.csv',f); f...

2년 초과 전 | 0

답변 있음
How to undo axis(gca,'image')
set(gca,'DataAspectRatioMode','auto')

2년 초과 전 | 0

| 수락됨

답변 있음
How can I better control bestfit lines
"I would like to ... remove the markers from within the error bars ... I would also like the best fit curves to extend past the ...

2년 초과 전 | 0

| 수락됨

답변 있음
While loop in function
The first iteration of the while loop produces an epsilon_a(i) of -310.558, which is less than 1, so the loop terminates (the te...

2년 초과 전 | 0

| 수락됨

더 보기