Community Profile

# Voss

Last seen: Today Actif depuis 2013

All

#### Content Feed

Afficher par

A répondu
how to find where a value falls in a list
A = [ 1 0 2 0.053 3 0.105 4 0.157 5 0.208 6 0.258 7 0.306 8 0.353 9 0.399 10 0...

environ 4 heures il y a | 0

| A accepté

A répondu
"Assigning to 2 elements using a simple assignment statement is not supported. Consider using comma-separated list assignment." Error only sometimes happens.
If you have two y-axes, then ax.YAxis is non-scalar, so ax.YAxis.LineWidth = 1.5; gives you an error. Notice that the previou...

environ 21 heures il y a | 0

A répondu
Inconsistancy of colorbars across contourf() plots
Use clim() instead of setting the y-limits of the colorbars. https://www.mathworks.com/help/matlab/ref/clim.html X = 1:10; Y ...

environ 21 heures il y a | 0

| A accepté

A répondu
Concatenating a signal given its segments' limits
ww = [ 10 15 16 22 33 44 45 50 51 60 70 80 ]; N = 1; to_keep = ww(2:end...

2 jours il y a | 1

| A accepté

A répondu
griddedInterpolant error "Interpolation requires at least two sample points for each grid dimension."
The points (bp1, bp2, bp3) in 3d space do not form a grid. They are equally-spaced points along a line segment from (0,5,2) to (...

3 jours il y a | 0

A répondu
export excel from Matlab compiler
The code looks like it will work the same in a compiled executable as it does in (uncompiled) MATLAB. The difference is that th...

3 jours il y a | 0

A répondu
On line 53: error = abs(-15 - Theta(i)); . I'm getting an error that says, "Index exceeds the number of array elements. Index must not exceed 17901". what am I doing wrong?
First, let me run the code almost up to where the error happens: clc clear all %Given: M1 = 3; G = 1.4; tot = 180; Theta=...

3 jours il y a | 0

A répondu
create empty pie chart (or not generate the graph)
Maybe something like this: matrix_new = []; figure if isempty(matrix_new) % matrix_new is empty: create the circle ...

3 jours il y a | 0

A répondu
How to change bacground color of uitreenode?
% remove any existing uistyles from the uitree: removeStyle(app.Tree) % create a new uistyle for Blue Background: s = uisty...

3 jours il y a | 0

| A accepté

A répondu
Resolution of plot code errors
Use fplot instead of plot: syms x; y=1/sqrt((1-x^2)^2+(2*x)^2); fplot(x,y); xlim([0 5]); ylim([0 4]);

3 jours il y a | 0

A répondu
Why does UIaxes handle is deleted when calling a function and taking inputs as UIaxes handle in MATLAB webapp ?
copyUIAxes called with one input creates a new figure, as the comment near the top of copyUIAxes.m states: % COPYUIAXES(uiax) c...

4 jours il y a | 0

A répondu
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...

6 jours il y a | 1

| A accepté

A répondu
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...

6 jours il y a | 0

A répondu
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....

7 jours il y a | 0

| A accepté

A répondu
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...

7 jours il y a | 0

A répondu
How to add data to an existing UITable in app designer?
old_data = app.UITable.Data; app.UITable.Data = [old_data; new_data];

7 jours il y a | 1

A répondu
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 ...

8 jours il y a | 0

| A accepté

A répondu
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...

9 jours il y a | 0

A répondu
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...

9 jours il y a | 0

A répondu
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...

9 jours il y a | 0

A répondu
split character strings into cell arrays without delimiter
ch = ['AEADHF';'TYESDF'] C = num2cell(ch)

13 jours il y a | 0

| A accepté

A répondu
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...

13 jours il y a | 0

A répondu
image grayscale and distortion
In the distortImage function, notice that the code for color images: distorted(1:halfwayRows, 1:halfwayCols, :) = bottomRight; ...

13 jours il y a | 0

| A accepté

A répondu
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...

13 jours il y a | 0

A répondu
url = 'https://www.ngdc.noaa.gov/thredds/catalog/global/ETOPO2022/15s/15s_surface_elev_netcdf/catalog.html'; % webread() the ...

13 jours il y a | 0

| A accepté

A répondu
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...

13 jours il y a | 1

| A accepté

A répondu
ginput on tiled layout in app designer
Try setting the HandleVisibility of the uifigure (not the tiledlayout), e.g.: app.UIFigure.HandleVisibility = 'on'; set(...

14 jours il y a | 0

| A accepté

A répondu
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 = [...

14 jours il y a | 0

A répondu
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 ...

14 jours il y a | 1

| A accepté

A répondu
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,...

14 jours il y a | 0

| A accepté