답변 있음
Multiply column by a number
Here is one way: varList = ["Var7","Var8","Var9"]; tbl{:,varList} = tbl{:,varList}*15;

대략 3년 전 | 0

답변 있음
How do I extract data from a matrix with a specific column value and place into a row in a new matrix.
Here is a straightforward method, assuming equal number of duplicates in the first column. % Input M = [1, 25 3, 33 3. 45 2...

대략 3년 전 | 0

답변 있음
How can I fill the area between these lines and curves?
You can use the fill function.

대략 3년 전 | 1

답변 있음
Delete columns if sum of a group of 10 columns is zero
Here is one way. for nc = 123:-10:3 colIdx = nc:(nc+9); if sum(Data1(15:end,colIdx),"all")==0 Data1(:,colIdx...

대략 3년 전 | 0

| 수락됨

답변 있음
two x-axes, one above and one below, inverted
This documentation explains how to do multiple axes. And then you'll need to set the XDir property of one of the axes to "rever...

대략 3년 전 | 0

답변 있음
Fit nonlinear regression model
Answering your main question: beta0 is the initial guess at the coefficients of the fit. In your case, MATLAB is expecting a vec...

대략 3년 전 | 0

| 수락됨

답변 있음
Why there is a Invalid Expresssion error in my fit function?
Your code works: n = [1433;2700;1000000]; s = [1170.98;780.65;390.33]; f= fit(n,s,'power1') Did you perhaps try to spread th...

대략 3년 전 | 0

| 수락됨

답변 있음
Ordering of an array based off conditions
% Input data tmp = {'1e2','1h4','1t0', '3g2', '3g3', '3g4', '3q0', '3q1', '3q2'}; letter_list = {'t','q','e','g','h','i','j'};...

대략 3년 전 | 0

| 수락됨

답변 있음
How can I set the NaN values to black in a pcolor plot?
Set the axes background color to black: % Generate sample data data = rand(10, 10); data(3, 3) = NaN; % Set a specific value...

대략 3년 전 | 1

| 수락됨

답변 있음
extract statistically independent words
You can do n-gram processing with the Text Analytics Toolbox.

대략 3년 전 | 0

답변 있음
problem inconsistent dimension arrays
We can't run your code because we don't have all the inputs to do so. I suggest using the debugger to halt your code at that lin...

대략 3년 전 | 0

| 수락됨

답변 있음
In order to automate the fitlm command I need to select numerical data from a matrix, and matching variable names from another character array. I get an error on fitlm command
One way that is close to the syntax you used is this: lm=fitlm(tbl,sprintf('%s ~ %s',erase(strtrim(VarNames(OriColumns(i,1),:))...

대략 3년 전 | 0

답변 있음
I would like to delete the black line in the boxes
Those are the whiskers, in the compact style. You can set their length to zero. (I also removed outliers, to show it more clearl...

대략 3년 전 | 0

| 수락됨

답변 있음
A line does not appear when I plot
The way you have coded this, both h and Temp are going to be scalars (single values) after the loop completes, so there is only ...

대략 3년 전 | 1

답변 있음
What does this error mean?
This error means that a file named noisyaudio.wav was not found in your MATLAB search path.

대략 3년 전 | 0

답변 있음
How to plot 2 columns for 5 data set categories with different length using boxplot
There is a very similar example in the documentation for the boxchart function. To give more specific advice than that, we'd pr...

대략 3년 전 | 0

| 수락됨

답변 있음
No true random for standalone (files only) in AppDesigner?
Disclaimer: I've never used AppDesigner, or distributed standalone MATLAB exe files. Sounds like it is starting from the defaul...

대략 3년 전 | 1

답변 있음
Legend is not showing all the colors - bar plot
In each subplot, you are plotting [singleObjsPerc(i,1:2); singleObjsPerc(i,3:4); singleObjsPerc(i,5:6); singleObjsPerc(i,7:8); ...

대략 3년 전 | 1

| 수락됨

답변 있음
How do you remove a value from a table based on its value
One can do what you ask as follows: Value = ([0,0,1,1,0]); Heading = (["Radius", "Speed", "Type", "Location", "ID"]); Combine...

대략 3년 전 | 0

| 수락됨

답변 있음
Error regarding array while creating Nakagami-m Fading Model
If you use the MATLAB debugger, and stop your code just before that line, you'll see that the variable data and rx_data are not ...

대략 3년 전 | 0

답변 있음
Subplot output data seen in two different window.
On this line of your code xlabel('W_r'); ylabel('I'); figure; the figure command is creating a new figure window. Don't call t...

대략 3년 전 | 0

답변 있음
Colorbar is opposite of scatterplot
It is more difficult to debug your result, when you have not given us the full code that generates your figure. But, I see no p...

대략 3년 전 | 0

| 수락됨

답변 있음
Set default TileSpacing and Padding
Here's how to get the current default setting, which you can then set as you wish. get(groot,"defaultTiledlayoutPadding") get(...

대략 3년 전 | 0

| 수락됨

답변 있음
How to take a mean from a range of values
x = [1 2 3 4 5]; y = [10 20 30 40 50]; xInRange = (x>2.5) & (x<=4.5); mean(y(xInRange))

대략 3년 전 | 0

| 수락됨

답변 있음
Multiplication of two arrays of different size
A = [2 3; 5 7; 11 13]; B = [4 6; 8 9; 10 12; 14 15]; C = A * B.'

대략 3년 전 | 0

답변 있음
Lower and upper bounds of correlation coefficient
You can look at the code of corrcoef by typing edit corrcoef In R2022b, the computation is done in lines 158-172. I didn't fi...

대략 3년 전 | 0

답변 있음
linear model of my code and the R^2 answer change every time i change the input, but the non-linear model gives me the same R^2 answer even when changing my input.
Here is why you always get the same result for your "non-linear" model. Notice that your first variable (Cement) is the one wit...

대략 3년 전 | 0

답변 있음
Why my test accuracy higher than validation accuracy?
There is no mystery here. Although in general a classifier will perform a little less well on the test set, sampling error can l...

대략 3년 전 | 1

| 수락됨

답변 있음
Software compatibility intel vs M1 apple
Here are the system requirements for R2023a. (You can link to other releases from that page as well.) The M1 chip is supported,...

대략 3년 전 | 0

답변 있음
Error in Kramers-Kronig Relations
You haven't defined a variable named k_vec before this line of code n_vec = zeros(size(k_vec)); so MATLAB errors out when it t...

대략 3년 전 | 0

더 보기