回答済み
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...

約6年 前 | 0

| 採用済み

回答済み
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...

約6年 前 | 0

回答済み
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

約6年 前 | 0

回答済み
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,...

約6年 前 | 0

回答済み
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...

約6年 前 | 0

| 採用済み

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

約6年 前 | 1

| 採用済み

回答済み
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 ...

約6年 前 | 0

回答済み
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,...

約6年 前 | 0

回答済み
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');

約6年 前 | 0

回答済み
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...

約6年 前 | 0

| 採用済み

回答済み
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...

約6年 前 | 0

| 採用済み

回答済み
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...

約6年 前 | 1

| 採用済み

回答済み
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)

約6年 前 | 0

回答済み
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...

約6年 前 | 0

| 採用済み

回答済み
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...

約6年 前 | 0

回答済み
Create matrix of maximum values from cell array
cellfun(@max,FR)

約6年 前 | 0

| 採用済み

回答済み
[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...

約6年 前 | 1

回答済み
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...

約6年 前 | 2

| 採用済み

回答済み
How do I vectorize this for loop?
You will need to convert to linear indices with sub2ind.

約6年 前 | 0

回答済み
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)...

約6年 前 | 0

| 採用済み

回答済み
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...

約6年 前 | 1

回答済み
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...

約6年 前 | 0

回答済み
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...

約6年 前 | 0

回答済み
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)...

約6年 前 | 0

| 採用済み

回答済み
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 ...

約6年 前 | 0

| 採用済み

回答済み
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...

約6年 前 | 0

回答済み
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...

約6年 前 | 0

回答済み
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...

約6年 前 | 1

| 採用済み

回答済み
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...

約6年 前 | 0

回答済み
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...

約6年 前 | 0

さらに読み込む