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

fast 9 Jahre vor | 0

| akzeptiert

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 1

| akzeptiert

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

fast 9 Jahre vor | 0

Gelöst


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

fast 9 Jahre vor

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 1

| akzeptiert

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

fast 9 Jahre vor | 2

| akzeptiert

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

fast 9 Jahre vor | 1

| akzeptiert

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 1

| akzeptiert

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 2

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 1

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

| akzeptiert

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

| akzeptiert

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

fast 9 Jahre vor | 0

| akzeptiert

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 1

Beantwortet
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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

Mehr laden