Réponse apportée
Extracting "endpoints" from a skeleton image to enable a circle to be defined.
This can probably be improved, but this will find an approximate circle. It will slightly underestimate the radius, as it tries ...

environ 6 ans il y a | 1

Réponse apportée
Fit two data sets with 3 fit parameters, one parameter is the same
As far as I'm aware, you can only fit a single function at once, so you can try something like this: f1 = @ (p,x1) p(1)./sqrt((...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
Matlab system command doesn't work properly on linux platform
If you want to capture the output to a Matlab variable, you should use the second output: [status,response]=system('hostname -s...

environ 6 ans il y a | 0

Réponse apportée
I had write the function for find the difference of maximum and minimum from each martix row and express it as matrix .
If you want a column instead of a row, why not transpose? And if you want both outputs, you will have to use a syntax with two o...

environ 6 ans il y a | 0

Réponse apportée
how to run a code putting conditions on names cell
Convert the array to a 3D array: (patient,session,param_index). You can fill missing slots with NaN. That way it is just a matte...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
How to suppress warnings when running Simulink simulation programmatically?
Unless Simulink is not playing nice, this should work: ... w=warning('off','all'); sim('rocket_sim'); warning(w); fprintf('...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
find groups in datetime vector by date
Datetimevector=datetime([2020 2020 2020],[02 02 10],[3 3 4],[10 11 12],[0 0 0],[0 0 0]); rounded_to_day=datetime(year(Datetim...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Does course completion certificate will be provided for free courses?
Assuming you are talking about Matlab Academy: yes, you will be able to download a pdf with a certificate.

environ 6 ans il y a | 0

Réponse apportée
intro to programing MATLAB, Matrix
You can use the colon to index all values in a dimension: IMG(2,2,:)=[100 255 255];%assign RGB values to a pixel You can also ...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
change the colormap of a figure using another GUI
Whenever you are working with a GUI: use explicit handles. Many functions accept handles to the affected object as an input, col...

environ 6 ans il y a | 0

Réponse apportée
about strings properties issstrprop
You forgot the 's' switch with your call to input: s= input('s: ','s'); isstrprop(s, 'alpha')

environ 6 ans il y a | 0

| A accepté

Réponse apportée
If else statement problem
ca is already smaller than 50 at the start of the loop, so the content of the while loop doesn't run. You could find this out...

environ 6 ans il y a | 0

Réponse apportée
The min and max function return incorrect result!
You didn't notice the exponent: max(Features) ans = 1.0e+09 * If you want to control how your data shows up in ...

environ 6 ans il y a | 1

Réponse apportée
combining text files from separate folders to one text file using for loop
for n_file=1:3%or use dir() to find which files you have fname_max=sprintf('tmax_%d',n_file); data_max=___%read data t...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
How can I replace an inline function with a anonymous function?
a=input('Insert a number: '); Example=@(x) x.^a; disp(Example(10)) Alternatively, you can use str2func to create a function h...

environ 6 ans il y a | 0

Réponse apportée
Explanation of cellfun()
cellfun will apply your function to the contents of you cell array. There are 3 ways to specify the function: as a char array (...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
n nearest non NaN values
You can use fillmissing: B=fillmissing(A,'nearest');%replace NaN with nearest non-NaN value

environ 6 ans il y a | 0

Réponse apportée
Comand window answer is wrong while the values in variable are ok. the x values in comand window is repeated and not in sequence
You are printing the full arrays in your fprintf statement. You also forgot to pre-allocate your arrays, and you forgot to write...

environ 6 ans il y a | 0

Réponse apportée
How to delete all repeat rows?
There is probably a more efficient way, but you can use unique() to get all first occurrences. Then you can use the second outpu...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
How to get XYZ coordinates of all non-zero voxels in a 3D volume?
If you want to hide a bit of the implementation that Ameer showed you: I have extended the capabilities of find to more dimensio...

environ 6 ans il y a | 0

Réponse apportée
How to extract specific data from multiple .mat files
You need to think about how you want to store your data. The code below will store everything in a cell array, but it would prob...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
I get this error message for this code: Array indices must be positive integers or logical values.
Check if you have shadowed any function with a variable. Simply by running your code in a clean workspace I found some typos. Th...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Storage of first few values in an array but with an if condition
If you want to find the first block of true in L, you can use this code: A = [0.25;0.12;0.18;0.21;0.26;0.18;0.19;0.25;0.26;0.12...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
How can I fit 3 datasets with individual fit functions, which all share some fit parameter?
You need to define a single cost function. OLS=sum((f(b,x) - y).^2);%Ordinary Least Squares You can use the fminseach function...

environ 6 ans il y a | 0

Réponse apportée
i want to take each row in matrix
Trivial with the color operator: clc data=[0 0 ;0 0 1;0 0 1;1 1 1;0 1 1;1 0 1;1 1 1]; for n=1:size(data,1) tmp=data(n,:)...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
How to include arrows as pointers of a particular point in plot?
A completely different strategy would be to use the LaTeX interpreter to insert an arrow as a text object: x = 0:pi/20:2*pi; y...

environ 6 ans il y a | 1

Réponse apportée
How to move slider-bar with a step-size of two?
Round the Value property to the nearest value in your array in the callback function. allowed_vals=1:2:10;%better: store this i...

environ 6 ans il y a | 2

| A accepté

Réponse apportée
xtixks in 2d plot
datetick seems a good place to start. Otherwise you can see if the xtickformat function suits your need.

environ 6 ans il y a | 1

| A accepté

Réponse apportée
Writing a 3x3 matrix as the 3rd and 4th dimesions of a multidimenstioanl array
This should work: [covRGBa,aveRGBa] = covary(RGB,r,c,xleft,xright,ytop,ybottom,n,perimeter); aveRGB(c,r,:)=aveRGBa; covRGB(c,...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Not enough input arguments.
I'm going to ignore the decision to use global variables (especially so many, and with such short names). You ran the function ...

environ 6 ans il y a | 0

Charger plus