回答済み
How to call a function within ax=gca format
This seems to be impossible. The closest I came was the code below. c = @cmu.colors; col=c('deep carrot orange');%returns this...

6年弱 前 | 0

| 採用済み

回答済み
for loop & saving tables
The easiest way is to read the excel file, append the new results and write the newly expanded cell array. Alternatively you ca...

6年弱 前 | 0

| 採用済み

回答済み
running an external program by changing input text file for every iteration in windows.
This should do the trick for you: % ------ open files and read the data in an array -------------- clc; clear; fid = fopen('i...

6年弱 前 | 1

| 採用済み

回答済み
All the combinations of sums of rows of matrices
The order is not the same as you stated, but this will work: A=[... 1 0 2 1 2 4 1 3 0 1 3 2]; ...

6年弱 前 | 1

回答済み
How to run multiple iterations while increasing the index?
The easiest way to do this is to standardize the bins. If you don't want that, you should probably use a cell array. for n=1...

6年弱 前 | 0

| 採用済み

回答済み
Adding cell array values across column
It looks like you can simply convert to a normal matrix (and back): A={your_cell}; A=cell2mat(A); A=sum(A,1); A=num2cell(A);...

6年弱 前 | 1

| 採用済み

回答済み
calculation of average and difference from imported data
Well, if that is the input, then this edit to your function should work: function P = damage(time,stress) a = 2.416; b = 0....

6年弱 前 | 2

回答済み
I have a question about using table
You should use a different syntax: class(test) Your current syntax is equivalent to class('test')

6年弱 前 | 0

| 採用済み

回答済み
Is it possible to group if-end code in the same way as a for loop?
Yes, look in the preferences:

6年弱 前 | 0

| 採用済み

回答済み
How can i select all the same codes in a function at once while MATLAB only highlights them that they are same code?
Since they have no relation to the variables in other functions, you can't. It is possible if it is a function call. So a worka...

6年弱 前 | 0

| 採用済み

回答済み
Write unicode flag to text file
Matlab stores characters internally in a uint16. That means only your first character is supported: isvalidchar = double(uint16...

6年弱 前 | 2

| 採用済み

回答済み
Write a function called valid_date that takes three positive integer scalar inputs year, month, day. If these three represent a valid date, return a logical true, otherwise false. The name of the output argument is valid. If any of the inputs is not
There are two things I notice in your code: You don't test anywhere whether the input is a scalar or a vector/array. Your leap...

6年弱 前 | 0

| 採用済み

回答済み
find expression within {}
You were close: you forgot to make the expression lazy, and you forgot you included the close bracket from the sting when exclud...

6年弱 前 | 0

| 採用済み

回答済み
Compute the minimum distance between each element in a vector with another larger array
I don't think there is a way around doing some calculation for each pair. Is there a way to vectorize distance_latlon? If not, ...

6年弱 前 | 1

| 採用済み

回答済み
Are Ryzen-5 4600H processor support Matlab.
There was an issue with an instruction set not being used. This is now fixed, at least for R2020a (and a workaround solution exi...

6年弱 前 | 0

回答済み
Finding the number of datapoints in a text file
It looks like you can look for the line with '[data]' on it, and continue until the first line that doesn't start with a digit o...

6年弱 前 | 1

| 採用済み

回答済み
Is it possible to save plotted points?
Either save the data you use to create the plot, or retrieve that data from the XData and YData properties of the line object cr...

6年弱 前 | 0

回答済み
Problem with plotting an anonymous function
Let's first make the terms more readable: calka1 = @(X)(integral(@(x)((... x.*(-1.15517395637196e-2)... +x.^2.*5.2577...

6年弱 前 | 1

回答済み
create a new variable that is the product of lag value of another variable and its own lag value
survival=cumprod(1-mortality);

6年弱 前 | 1

| 採用済み

回答済み
How to make a matrix has more pixels?
If you want to increase the size of the black and white parts in equal proportion, you can use the repelem function.

6年弱 前 | 0

| 採用済み

回答済み
omit for-loop per arrayfun function
I doubt arrayfun will cause the speed-up you're hoping for. It has its own overhead, so it might even be slower. Functions like ...

6年弱 前 | 1

| 採用済み

回答済み
Copy If greater than column value
Use rowfun or a loop. Your current logical statement is checking all rows at once.

6年弱 前 | 0

| 採用済み

回答済み
Compare Strings in a loop
If you know the number of interations, why not use a for loop again? for k = 1:size(data.CellA,1) %use size(___,dim) instead of...

6年弱 前 | 0

| 採用済み

回答済み
How to find the string on .txt
Use strfind to find the start of a string, then use the length of the input to generate all indices.

6年弱 前 | 0

回答済み
Making a software / GUI that is able to save data and change itself.
The things you mention are all possible. For general advice and examples for how to create a GUI (and avoid using GUIDE), have l...

6年弱 前 | 0

回答済み
Plot for different conditions of function
Your code is plotting scalars. If you want to see a line you should put in multiple values at the same time. for x=-30:1:30 if...

6年弱 前 | 0

| 採用済み

回答済み
How to change the Author name in my account?
Go to https://www.mathworks.com/mwaccount/profiles/edit and click the community tab. You can change your nickname there.

6年弱 前 | 0

回答済み
How can I display boxplots and subplots in different windows?
You can provide explicit handles for most graphics calls. qqplot is one of the exceptions. How you can deal with them is shown b...

6年弱 前 | 0

回答済み
Standalone compilation and use of GUI app
Yes. You asked Matlab to include the txt file, so it did. If you don't want to include it in the packaged app, you shouldn't add...

6年弱 前 | 0

さらに読み込む