Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
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]; ...

presque 6 ans il y a | 1

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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);...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
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....

presque 6 ans il y a | 2

Réponse apportée
I have a question about using table
You should use a different syntax: class(test) Your current syntax is equivalent to class('test')

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Is it possible to group if-end code in the same way as a for loop?
Yes, look in the preferences:

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Write unicode flag to text file
Matlab stores characters internally in a uint16. That means only your first character is supported: isvalidchar = double(uint16...

presque 6 ans il y a | 2

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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, ...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 1

Réponse apportée
create a new variable that is the product of lag value of another variable and its own lag value
survival=cumprod(1-mortality);

presque 6 ans il y a | 1

| A accepté

Réponse apportée
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.

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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 ...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
Copy If greater than column value
Use rowfun or a loop. Your current logical statement is checking all rows at once.

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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.

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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.

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 0

Charger plus