Réponse apportée
Problems trying to use bar
You can use the function below to create fake bars by using plot. This function accepts (nearly) all input arguments that plot a...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
how do I create a function
You can use something like this: close all x1=rand(10,1); myfun(x1) x2=rand(10,1); myfun(x2) x3=rand(10,1); myfun(x3) x4...

environ 6 ans il y a | 0

Réponse apportée
Import data from text file and delete blank rows, columns, headers and unnecessary values
T=readmatrix('data.txt','NumHeaderLines',4); T(:,1)=[];%remove row indices in first column

environ 6 ans il y a | 0

Réponse apportée
How can I repeat this shape NxN times with a certain spacing between repeated shapes?
Make the coordinates depend on x1 and y1: x1=0.25; y1=0.25; draw_line_and_patch(x1,y1) function draw_line_and_patch(x1,y1,...

environ 6 ans il y a | 0

Réponse apportée
Is it possible to access the lines of code from a pre built command
You mean a builtin Matlab function? That may be possible, but since it is bound by copyright you can't actually use that knowle...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Treatment G-code file
str = fileread('gcode.txt'); cell_str=strsplit(str,'\n') character = 'Z'; TF = contains(cell_str,character); line_num=find(T...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
can you help me to find out whats wrong here??
If you want to do this, you will probably have to convert to a char array and then convert to a double array. %because this is ...

environ 6 ans il y a | 0

Réponse apportée
Applying smoothing to image
A convolution may be what you need. mask=rand(3,3);mask=mask/sum(mask(:)); IM=uint8(randi(255,100,100)); IM2=convn(IM,mask,...

environ 6 ans il y a | 0

Réponse apportée
How to compute centered moving average from an NxM array
You can use a convolution with a flat array as the second input. avg_val = convn(M(:,2), ones(30,1)/30, 'valid');

environ 6 ans il y a | 0

Réponse apportée
slicing matrix in efficient way
Something like this should do the trick: a=1:120; b=reshape(a,10,3,[]); x=squeeze(b(:,1,:)); y=squeeze(b(:,2,:)); z=squee...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
How to store values from push button and then add all values and display in a static text box
If you're using GUIDE for the first time: don't. Do not teach yourself a tool that will be removed from Matlab in one of the nex...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Adding a global legend to a tiledlayout
I can't get the position quite right, maybe you have more luck with your tinkering. This at least gets rid of the line. (I guess...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
Replace values in matrix based on array values
Nobody is born knowing about ismember and ismembertol. (use the latter if you expect float rounding errors)

environ 6 ans il y a | 0

Réponse apportée
Matrix multiplication, matrix with variables
If this code works, why not use this? Fin=T_vit*R_lens_post*T_lens*R_lens_ant*T_aqueous*R_cor_post*T_cornea*R_cor_ant; You als...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Creating text for subcaptions in subplot figure
Even for subplots you can use the title and xlabel functions. Your picture looks like you want to use xlabel. clc;clear; rng(4...

environ 6 ans il y a | 0

Réponse apportée
Create matrix of maximum values from cell array
cellfun(@max,FR)

environ 6 ans il y a | 0

| A accepté

Réponse apportée
[DISCONTINUED] MATLAB Answers Wish-list #5 (and bug reports)
A soft-lock for questions, similar to StackExchange. This soft-lock would prevent low/no-reputation users (e.g. <5) from postin...

environ 6 ans il y a | 1

Réponse apportée
How to Concetanate Arrays in a Struct?
You were close with your commented code. %see what this returns? MasterResult.Durchschnittswert %you can concatenate that c...

environ 6 ans il y a | 2

| A accepté

Réponse apportée
How do I vectorize this for loop?
You will need to convert to linear indices with sub2ind.

environ 6 ans il y a | 0

Réponse apportée
replacing element which are <= previous element with NaN
This code may not be efficient for very large vectors. x = [1 2 3 4 3 2 3 4 6 8 5 5 6 8.5 9 11 12 ]; y=movmax(x,[numel(x)...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
Change language to english
Your strong language is not necessary and makes people take you much less serious. There is no need for it. To change the langu...

environ 6 ans il y a | 1

Réponse apportée
is NVIDIA RTX 6000 , compatible with Matla R2020a and R2017b?
According to this documentation page: yes. The Quadro RTX 6000 is from the Turing architecture, so it is fully supported on R202...

environ 6 ans il y a | 0

Réponse apportée
how to save/write images using for loop in one .mat file
As Ameer suggests: you should share the code, so we can suggest how you can implement indexing. The point is that your code cur...

environ 6 ans il y a | 0

Réponse apportée
I am having trouble finding the curve fit of an equation in matlab
You're almost there: ln(y) = ln(A) + ln(x) + B*x ln(y) - ln(x) = ln(A) + B*x %so: y2 = ln(y) - ln(x); p = polyfit(x,y2,1)...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
How to create a menu using GUI
You can use the uicontrol style text to create a block of text. Then make a callback function for a key press. In that callback ...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
How can I find the centroid of this circle of objects?
There are at least two options here. The first is to take the average of the x coordinates and y coordinates of the white pixels...

environ 6 ans il y a | 0

Réponse apportée
for loop not working
Then you are stuck with first undoing that mistake. You should convert those coordinate variables to a single array. You can use...

environ 6 ans il y a | 0

Réponse apportée
how to recived input user in matlab
You need to specify that you want the result as a char array: str=input('enter the string>>','s'); It is also a good idea to d...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
How to skip lines to execute/run?
You should be using strcmp to compare strings or chars, but otherwise what you describe is exactly what you need to do (well, on...

environ 6 ans il y a | 0

Réponse apportée
Changing decimals shown in matrix?
You can control this with the fomat function. The closest you can get is two decimals with format bank You should be aware tha...

environ 6 ans il y a | 0

Charger plus