Beantwortet
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...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 6 Jahre vor | 0

Beantwortet
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

etwa 6 Jahre vor | 0

Beantwortet
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,...

etwa 6 Jahre vor | 0

Beantwortet
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...

etwa 6 Jahre vor | 0

| akzeptiert

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

etwa 6 Jahre vor | 1

| akzeptiert

Beantwortet
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 ...

etwa 6 Jahre vor | 0

Beantwortet
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,...

etwa 6 Jahre vor | 0

Beantwortet
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');

etwa 6 Jahre vor | 0

Beantwortet
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...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 6 Jahre vor | 1

| akzeptiert

Beantwortet
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)

etwa 6 Jahre vor | 0

Beantwortet
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...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 6 Jahre vor | 0

Beantwortet
Create matrix of maximum values from cell array
cellfun(@max,FR)

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
[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...

etwa 6 Jahre vor | 1

Beantwortet
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...

etwa 6 Jahre vor | 2

| akzeptiert

Beantwortet
How do I vectorize this for loop?
You will need to convert to linear indices with sub2ind.

etwa 6 Jahre vor | 0

Beantwortet
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)...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 6 Jahre vor | 1

Beantwortet
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...

etwa 6 Jahre vor | 0

Beantwortet
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...

etwa 6 Jahre vor | 0

Beantwortet
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)...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 6 Jahre vor | 0

Beantwortet
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...

etwa 6 Jahre vor | 0

Beantwortet
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...

etwa 6 Jahre vor | 1

| akzeptiert

Beantwortet
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...

etwa 6 Jahre vor | 0

Beantwortet
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...

etwa 6 Jahre vor | 0

Mehr laden