Respondida
Read files in a specific order
You can sort the output or |dir| any way you like. See below for an example. filelist=dir('NUM_*.dat'); dates=[filelist....

alrededor de 8 años hace | 1

Respondida
Installing matlab in ubuntu
Not all toolboxes are fully functional on every OS. You can find a full list <https://www.mathworks.com/products/availability.ht...

alrededor de 8 años hace | 0

Respondida
solve the intersection of the line and surface
You need to declare globals in each function you use them to enable the functionality. You should in general avoid |global| v...

alrededor de 8 años hace | 0

| aceptada

Respondida
meanfreq Command in Matlab
With some functions, you can take a look at the underlying code with the |edit| command. You're in luck: meanfreq is such a func...

alrededor de 8 años hace | 1

Respondida
2 different for loops at the same time ?
You must index M. jj_= 4:5:length(A); ii_= 5:5:length(A); A = xlsread('example.xlsx'); M=zeros(numel(ii),numel(jj)...

alrededor de 8 años hace | 1

Respondida
Why Matlab2017b do not recognize Microsoft visual studio 2015 as compiler?
You need the visual studio 2015 professional edition according to the <https://www.mathworks.com/content/dam/mathworks/mathworks...

alrededor de 8 años hace | 0

| aceptada

Respondida
how to get your x and y axis to skip every other tick mark?
You can set the |XTick| property of your axes: data1 = [9.3 480; 9.7 501; 9.7 540; 9.7 552; 9.9 547; 10.2 622; 10.5 655; 11...

alrededor de 8 años hace | 0

| aceptada

Respondida
Hi, i have a problem regarding curve fitting. I have a set of data which is linear, but i want to fit a cos(k*l)^2 to this data and wants to find for which value of (k*l), for which the initial linear part of cosine curve fits my data?
You can use the code below to choose a value for l that results in the least difference between the actual data and the output d...

alrededor de 8 años hace | 0

| aceptada

Respondida
Why Matlab only run the "else" function equation even "a" fulfils the condition in "if" function? The graph is plotted based on the equation in "else" function only no matter whether "a" is less than 198 or not.
If you are on R2018a you will see an m-lint warning that |a| is a non-scalar operator (and maybe earlier show it as well). The |...

alrededor de 8 años hace | 0

| aceptada

Respondida
Editing multiple elements of an array in one line
The error you get for your example will probably depend the release. On R2018a, the implicit expansion tries to expand |b| to fi...

alrededor de 8 años hace | 1

| aceptada

Respondida
Running exe file created with C++ from Matlab not working
And if you try to |cd| inside the same system call? system('cd /d C:\Users\me\Folder_Location && File_Name.exe') The |/d...

alrededor de 8 años hace | 0

Respondida
How to draw perpendicular/orthogonal lines?
As my code was apparently a full answer to your question, I'll repost my comment as an answer so you can accept it. origin=...

alrededor de 8 años hace | 1

| aceptada

Respondida
how to combine different matrix dimensions into a single matrix ?
Matlab arrays must be rectangular. The concatenation you show is possible, so it should only give errors if you dimension descri...

alrededor de 8 años hace | 0

Respondida
Trying to convert cell to array when cells have range of values
This should do the trick. It assumes array indexing is possible. a={[1 2 3]',[1 1]',[1 2 3 4 5 6]'}; maxlen=max(cellfun(...

alrededor de 8 años hace | 0

| aceptada

Respondida
How does OR work in an IF statement?
Because each is treated as separate test. Therefor you will need to use something like the line below. You could also use |switc...

alrededor de 8 años hace | 1

| aceptada

Respondida
Move empty cell in a row
Does |cell2mat| work for you? I you want to keep it as a cell, you can also follow it up with |num2cell|. A={1,2,3,4,5,[],[...

alrededor de 8 años hace | 2

Respondida
How do I use Integration and Differentiation in GUI?
If you look carefully at the documentation, you can see that the |integral| function is for numeric integration and requires a l...

alrededor de 8 años hace | 0

Respondida
optimization - using fmin
If you can set a finite lower bound of |Epsilon_A_S| and a finite upper bound of |Epsilon_A_c|, you can use <https://www.mathwor...

alrededor de 8 años hace | 0

| aceptada

Respondida
Regexp with multiple lines
The value if very variable, so you need to extract it first, before you can compose the appropriate expression: |Ethereum.*\$760...

alrededor de 8 años hace | 1

| aceptada

Respondida
how do i write a function that take a vector and only displayes prime elements
You are very close. The only thing you need to do is use the logical vector to keep only prime elements. BTW, are you sure you a...

alrededor de 8 años hace | 0

Respondida
What's the difference between Instance Number and Acquisition Number tags in DICOM images?
This is not a Matlab question, but a question about DICOM standards. You can easily find the descriptions by using your favorite...

alrededor de 8 años hace | 3

| aceptada

Respondida
Create a workspace with a given variable from multiple saved workspaces
You could use |eval| to do that, but you shouldn't. You should use indexing instead. Use a cell array or a struct. (I have ta...

alrededor de 8 años hace | 0

Respondida
Fake colorbar for image
As long as you're not using the colormap to show anything, you can use the method below. If you need to use the colormap, you ca...

alrededor de 8 años hace | 3

Respondida
How do i remove a row from a cell or table, if the digit in the last column is -1? Fx the last row in the example below should be removed. thank you
A_cell={4,7,3,5,0 ; 5,5,5,4,-1}; A_num=cell2mat(A_cell); A_num(A_num(:,end)==-1,:)=[]; A_cell=num2cell(A_num); Thi...

alrededor de 8 años hace | 0

| aceptada

Respondida
Polyfit with odd powers only?
%set initial estimate intial_b_vals=[1 5]; x = rand(10,1);%x-values yx = rand(10,1);%measured y(x) %create fu...

alrededor de 8 años hace | 1

Respondida
How to get unique members of an array of handle classes?
<https://www.mathworks.com/help/matlab/release-notes.html?rntext=unique&startrelease=R14SP2&endrelease=R2018a&groupby=release&so...

alrededor de 8 años hace | 0

| aceptada

Respondida
how to find out position of minimum element in a matrix
a=[8 2 5;2 -2 4;9 5 4] ; [r,c]=find(a==min(a(:))); This will even work if there are multiple positions where the minimum...

alrededor de 8 años hace | 0

| aceptada

Respondida
How do i add a new column to an already created uitable in matlab Guide?
As Jan mentioned in <https://www.mathworks.com/matlabcentral/answers/398605-is-it-possible-to-add-a-new-colulmn-to-an-already-pr...

alrededor de 8 años hace | 0

| aceptada

Respondida
How to get a desired result using regexp in matlab
Just like Stephen, I would also suggest changing your expression. exp2 = '[^()]'; str1 ='(1,2,3)'; str2='(1)'; [st...

alrededor de 8 años hace | 2

Respondida
Must be a string scalar or character vector.
You already read the dicom file to variable |A|, and then converted that to a double. Each loop iteration you are overwriting th...

alrededor de 8 años hace | 0

| aceptada

Cargar más