Respondida
Dose any one know any wrong with this function?
You have to store your code in an m-file under the same name as your function, in your case |intonom.m|. Once you do that, on th...

más de 8 años hace | 0

| aceptada

Respondida
Concatenate a variable number of matrices
I suppose your matrices have (in fact, they should be) consistent dimensions, so you could as well store them in ND array. d...

más de 8 años hace | 0

Respondida
Save sub-matrix column and row in another matrix
your_result = your_array(your_array(:,3)==your_choice_year,:); but an efficient way to store such data is to use a table. ...

más de 8 años hace | 1

| aceptada

Respondida
How can I calculate with distributions?
If I understand you correctly, those two are column vectors and you want to perform element-wise multiplication, right? In that ...

más de 8 años hace | 0

Resuelto


surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

más de 8 años hace

Respondida
Counting days by month
It's better to change your char array into datetime vector dt_array = datetime(char_array,'InputFormat','dd-MMM-yyyy') an...

más de 8 años hace | 0

Respondida
Options to use the switch case in matlab
try this, n = 3; while(n~=1 || n~=2) n=input('Enter the choice 1. Add 2. Remove'); switch n case 1 ...

más de 8 años hace | 1

| aceptada

Respondida
Store data into new variable in for loop
It's not a good idea to create such dynamic variables inside loop. How about this? Data = zeros(1,n); for k = 1:n Dat...

más de 8 años hace | 2

| aceptada

Respondida
how to match row of two different matrix?
ind = ismember(A,B,'rows'); if (~ind) A(end+1,:)=B; end

más de 8 años hace | 1

| aceptada

Respondida
If Else statement problem
The syntax is very simple, if (P1>=P1min) && (P1<=P1max) fprintf 'Machine 1 is in limits' elseif (P2>=P2min) && ...

más de 8 años hace | 0

Respondida
How to convert an arbitrary rational to binary digits?
dec2base(your_number,2) read the documentation here: <https://de.mathworks.com/help/matlab/ref/dec2base.html>

más de 8 años hace | 0

Respondida
How to convert character cells to date?
The image you have attached says it's a *table*. In that case, it's as simple as, finalCSVnew.Date = datetime(finalCSVnew.Da...

más de 8 años hace | 1

| aceptada

Respondida
Multidimensional array multiplication issue
It's a simple matrix multiplication, isn't it? impulse_matrix = rand(32,32); residue_matrix = rand(5021,32); mult_result...

más de 8 años hace | 0

Respondida
Help me. How to plot sqrt(0.5 + 0.5 cos(w))
Sampling frequency is the interval with which you sample fs = 8000; Now you use this to generate the 't' vector t = 0...

más de 8 años hace | 0

Respondida
How to generate random vectors from given set of values?
use randsample. <https://de.mathworks.com/help/stats/randsample.html> your_data = rand(30,1); random_indices = randsamp...

más de 8 años hace | 2

Respondida
How to Rearrange variables in equation
You should define them as symbolic variables before solving. syms lambda P1 eqn = (lamda == (781*P1)/250000 + 198/25) % ==...

más de 8 años hace | 0

Respondida
How to do xor operation?
Another method maybe, x = {'1' '1' '1' '0' '1' '1' '0' '1'}; v = {'1' '1' '0' '0' '1' '0' '1' '1'}; res = logical(zeros(...

más de 8 años hace | 1

Respondida
How to get 2 or more graphs in different windows?
to create a new figure window, use f = figure(your_window_number) <https://de.mathworks.com/help/matlab/ref/figure.html>...

más de 8 años hace | 0

Respondida
How to read specific row and column header from text file with csv format?
Why don't you just use readtable? <https://de.mathworks.com/help/matlab/ref/readtable.html> It's much more efficient and e...

más de 8 años hace | 0

| aceptada

Respondida
How to subtract elements in a matrix
Ok, I guess you want to subtract following column with the current column, B = circshift(A,-1,2)-A But your expected B...

más de 8 años hace | 0

Respondida
how to use variable from function ?
A function has inputs and outputs, for example function a =my_fun(x) a=22+x; end Here you are getting ...

más de 8 años hace | 0

Respondida
What would be the function to create this new table ?
Do you want to repeat the new value ten times on the second column of the new table? sumrepArray = [repmat(sumTable{1,2},10...

más de 8 años hace | 0

| aceptada

Respondida
Read files from a different directory in standalone applications
You need to modify your Model_A so that it asks the user to select a directory to read the files from. That way, you'll give the...

más de 8 años hace | 0

| aceptada

Respondida
how to plot cuboids in cuboids?
Check this FileExchange submission: <https://de.mathworks.com/matlabcentral/fileexchange/15161-plotcube>

más de 8 años hace | 0

Respondida
Calculating percentage differences between matrix array data
You can simply do, dummyMatrix1 = reshape(1:25,5,5); dummyMatrix2 = 10*dummyMatrix1; perCentDiff = (dummyMatrix2-dumm...

más de 8 años hace | 1

Respondida
How do I make a pushbutton execute a function that used to be done after user input was given?
function pushbutton_callback(src,event) [outputs] = your_function(inputs) end

más de 8 años hace | 0

Respondida
Help me with indexing please?
Change the part after you define xStep with the following code xp_0 = chord/2; yp_0 = 0; k = 1; wh...

más de 8 años hace | 0

Respondida
How to import multiple csv files into one and read it from certain folder?
You're only getting the list of files in the folder. You need to import them using csvread <https://www.mathworks.com/help/ma...

más de 8 años hace | 0

Respondida
How can i plot this exact graph?
What have you tried? Did you read the documentation? <https://www.mathworks.com/help/matlab/ref/colon.html> <https://www.m...

más de 8 años hace | 0

Cargar más