답변 있음
Remove specific cells in a cell array
fields_list = {'mode','time','date','Nav','state'}; remove_list = {'mode','date','Nav'}; fields_list(ismember(fields_list,re...

3년 초과 전 | 1

| 수락됨

답변 있음
Sort producing inconsistent results when re-ordering legend
Rather than relying on findobj, capture the output from plot, which is the line handle(s), and use those in legend. clear all ...

3년 초과 전 | 1

| 수락됨

답변 있음
variables are not updating after each loop in for loop
Well, you define B and C but never use them anywhere, so that could explain why iterations after the first don't matter. Try it...

3년 초과 전 | 0

| 수락됨

답변 있음
Create a "Copy-Button" in MATLAB GUI
(I modified your m-file to include pushbutton_Callback and pushbutton2_Callback in the handles structure so I could run those fu...

3년 초과 전 | 0

답변 있음
matlab plot legend bug
Some of those plot calls create more than one line so that there's not a 1:1 correspondence between the legend labels you specif...

3년 초과 전 | 0

답변 있음
Plot X Y Z data
ZYX = [ ... 100 454292352 480.9; ... 100 242004000 241.3; ... 100 133391456 122.2; ... 100 66707360...

3년 초과 전 | 0

답변 있음
text in subplot with large font
RR = 99.99; font_size = 12; subplot(3,3,6); text(0.5, 0.5, sprintf('Respiratory Rate: %.2f',RR), 'FontSize', font_size); a...

3년 초과 전 | 0

| 수락됨

답변 있음
Looping of grid plot
First, I'm not sure the first plot is correct. You can turn on a colorbar to see that the text numbers don't make sense with the...

3년 초과 전 | 0

| 수락됨

답변 있음
Bar Graph Misaligned on X Axis
That's because xticklabels doesn't set the x-ticks, only their labels, so the left-most x-tick - wherever it is - gets the first...

3년 초과 전 | 0

| 수락됨

답변 있음
How to test function inputs for vector/scalar?
You cannot concatenate things in a function definition like this: function [wire_length,spring_mass] = spring_length_mass([inne...

3년 초과 전 | 0

| 수락됨

답변 있음
Updating UiTable - Table not Updated
In order to have edits to the uitable automatically reflected in the workspace variable inputType2, you can give the uitable a C...

3년 초과 전 | 0

답변 있음
Average across the fields of a structure when each field contains a single value
S = struct('arbitrary',1.9623,'field',2.584,'names',1.9125) C = struct2cell(S) result = mean([C{:}])

3년 초과 전 | 0

| 수락됨

답변 있음
What do lines 36 and 37 mean?
for ss=1:N-1 That line defines a for loop that iterates N-1 times. Thus, the lines of code following that line but before the c...

3년 초과 전 | 1

| 수락됨

답변 있음
I want to make coordinate change for a vector of 10000+ columns
date_start=datetime(2023,2,6,17,42,21,'TimeZone','Europe/Rome'); date_end=datetime(2023,2,13,17,42,21,'TimeZone','Europe/Rome')...

3년 초과 전 | 0

| 수락됨

답변 있음
Index exceeds the number of array elements. Index must not exceed 10.
The size of FFT_array is 1000-by-10. Therefore, average, which is calculated by summing FFT_array along its first dimension and ...

3년 초과 전 | 0

답변 있음
How may I calculate the number of rows in each group?
diff(find([M(:,1); 1] == 1))

3년 초과 전 | 0

| 수락됨

답변 있음
Not sure why I am getting errors for my anonymous functions.
That's one error. g takes two inputs, but you are giving it only one when you use it here: C = g(f(g(x))) The input g...

3년 초과 전 | 1

답변 있음
Ranking numbers in a table and manipulating by division.
Possibly this: Table = readtable("practice3.xlsx"); [~,idx] = ismember(Table.values,sort(Table.values)); Table.ranks = idx;...

3년 초과 전 | 1

| 수락됨

답변 있음
Determine if an element in array of doubles start with patten
idx = find(floor(data)==val,1) where data is your array and val is what you're looking for, e.g., 8.

3년 초과 전 | 1

| 수락됨

답변 있음
Insert new values in specific position after processing
A(ind1) = Anew;

3년 초과 전 | 1

답변 있음
how to make if statement?
If you want H to be 1 when x(6)>0 and x(7)>0, then: H=0; if x(6)>0 && x(7)>0 H = 1; end If you want H to b...

3년 초과 전 | 0

| 수락됨

답변 있음
Adding Element based on Condition to Structure with For Loop
This: if MasterDataMeasurement.CurrentTrainingTrialRatio(i) == 1.8125 | 1.875 should be this: if MasterDataMeasurem...

3년 초과 전 | 0

| 수락됨

답변 있음
What do these lines of code mean
"Is it first initializing an empty array" Yes. "[then] storing the found user value into that array?" Storing the index (i) a...

3년 초과 전 | 0

답변 있음
Please help me to connect between three points with plot (draw line)
Inside the loop, store the values necessary to plot the line after the loop. See the y_store variable below. proj function s...

3년 초과 전 | 1

답변 있음
String array of the letters of the alphabet
string(('a':'z').').'

3년 초과 전 | 2

| 수락됨

답변 있음
How to fix weird plot behavior
You need to sort g before calculating y (or sort g and y afterwards - not shown here). % I made up some values for the missing ...

3년 초과 전 | 0

| 수락됨

답변 있음
I have a problem in the annexed excel file there are two tables, first table give the graph representing geological layers I need to get the second table with NaN values
t = readtable('data.xlsx'); t1 = t(:,1:12); % first table from file t2 = t(:,end-11:end); % second table from file disp...

3년 초과 전 | 0

| 수락됨

답변 있음
Combinations with a condition
Maybe something like this? x = [0 0.25 0.5 0.75 1]; x_1 = [0 0.5 1]; x_2 = [0 0.5 1]; x_12 = (x_1.'+x_2)/2; [ism,idx] = i...

3년 초과 전 | 1

| 수락됨

답변 있음
Filter value from multiple columns
load tNino1_2 "find the values equal to 1 in columns 20 to 24" [r,c] = find(tNino1_2(:,20:24) == 1) r is rows and c is column...

3년 초과 전 | 0

답변 있음
Facealpha bug in combination with 3D plots
You might try using the painters Renderer. See below for a comparison of those three cases with painters vs the default OpenGL R...

3년 초과 전 | 0

더 보기