Answered

Save multiple functions on a single vector

One possibility is to work with them as vectors and then unite them in one matrix. everyDay = 10; % N out1 = zeros(everyDay,...

Save multiple functions on a single vector

One possibility is to work with them as vectors and then unite them in one matrix. everyDay = 10; % N out1 = zeros(everyDay,...

3 days ago | 0

Answered

Getting array out of for loop

Treat p_out as a vector and you will be fine: for i = 1:length(n) % for loop for iteration of n times p_out(i) = p_in * ...

Getting array out of for loop

Treat p_out as a vector and you will be fine: for i = 1:length(n) % for loop for iteration of n times p_out(i) = p_in * ...

3 days ago | 0

Answered

saving data during iterations

It seems that you are overwriting y in each iteration. Being that the case, I would create a matrix stored_y to save the values ...

saving data during iterations

It seems that you are overwriting y in each iteration. Being that the case, I would create a matrix stored_y to save the values ...

3 days ago | 0

| accepted

Answered

Delete duplicate data rows from cell array

From this previous question A = [1 1 2 2 3 3 3]; [U, I] = unique(A, 'first'); x = 1:length(A); x(I) = []; Therefore in your...

Delete duplicate data rows from cell array

From this previous question A = [1 1 2 2 3 3 3]; [U, I] = unique(A, 'first'); x = 1:length(A); x(I) = []; Therefore in your...

12 days ago | 0

Answered

confusing regarding two cases of multiplication in MATLAB?

".*" -> Element-wise multiplication Example: [1 2 3].*[1 2 3] = [1*1 2*2 3*3] = [1 4 9] "*" -> Matrix multiplication Exampl...

confusing regarding two cases of multiplication in MATLAB?

".*" -> Element-wise multiplication Example: [1 2 3].*[1 2 3] = [1*1 2*2 3*3] = [1 4 9] "*" -> Matrix multiplication Exampl...

12 days ago | 1

| accepted

Answered

How to store values in a loop?

Just fill them like they are vectors. MATLAB can add new "cells" to each vector on the fly, or you can pre-define them for speed...

How to store values in a loop?

Just fill them like they are vectors. MATLAB can add new "cells" to each vector on the fly, or you can pre-define them for speed...

1 month ago | 0

| accepted

Answered

Plotting a continuous line from separate data files

Combine all of them in one vector before plotting. If they are line-vectors: x_data = [x1 , x2 , x3 ... x9]; y_data = [y1 , y2...

Plotting a continuous line from separate data files

Combine all of them in one vector before plotting. If they are line-vectors: x_data = [x1 , x2 , x3 ... x9]; y_data = [y1 , y2...

1 month ago | 0

| accepted

Answered

how should I correctly use findpeaks() so that the output will not show me the following error

Data is a matrix of Nx2. You just need to select which vector you want to use to search for the peaks. I guess is the second o...

how should I correctly use findpeaks() so that the output will not show me the following error

Data is a matrix of Nx2. You just need to select which vector you want to use to search for the peaks. I guess is the second o...

1 month ago | 0

| accepted

Answered

Easiest way to skip a few lines and then read data from this text file ( x and y) to draw a plot.

From yout MATLAB: Home -> Variable -> Import data. From there you can also create a function that will allow you to import futu...

Easiest way to skip a few lines and then read data from this text file ( x and y) to draw a plot.

From yout MATLAB: Home -> Variable -> Import data. From there you can also create a function that will allow you to import futu...

1 month ago | 0

Answered

Ascending table column labels

I would do it inside a for loop: matrix = [1 2 3; 3 4 5; 6 4 5; 9 8 7]; % 4 rows and 3 columns colnames = {}; % Initializes co...

Ascending table column labels

I would do it inside a for loop: matrix = [1 2 3; 3 4 5; 6 4 5; 9 8 7]; % 4 rows and 3 columns colnames = {}; % Initializes co...

2 months ago | 0

Answered

using google on matlab web browser

You need to generate the complete url from matlab and then pass that to web(url). After a brief testing, the format for google s...

using google on matlab web browser

You need to generate the complete url from matlab and then pass that to web(url). After a brief testing, the format for google s...

2 months ago | 0

| accepted

Solved

Times 2 - START HERE

Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

2 months ago

Answered

fprintf- I dont want to print one result.

clear clc x= input ('Enter x: '); %Degree of reaction to the virus from a blood test. showHours = 1; if x==0 disp ('Ne...

fprintf- I dont want to print one result.

clear clc x= input ('Enter x: '); %Degree of reaction to the virus from a blood test. showHours = 1; if x==0 disp ('Ne...

2 months ago | 1

| accepted

Submitted

createArchimedeanSolid

Creates required Archimedean solid with desired edge length a centered at origin.

2 months ago | 0 downloads |

Answered

how to find x if i only know y?

As you are working with degrees, I consider that you want to have natural numbers as a result, not something like 5.0358 degrees...

how to find x if i only know y?

As you are working with degrees, I consider that you want to have natural numbers as a result, not something like 5.0358 degrees...

2 months ago | 0

| accepted

Answered

Joining 2 tables to make 1 table

You can unite them as if they were matrixes: complete_table = [table1 ; table2]; % This should work to join the columns of both...

Joining 2 tables to make 1 table

You can unite them as if they were matrixes: complete_table = [table1 ; table2]; % This should work to join the columns of both...

3 months ago | 0

| accepted

Answered

For loop nested plotting

Use a if-else expression: if current_iteration == 10 plot(T,cost) end

For loop nested plotting

Use a if-else expression: if current_iteration == 10 plot(T,cost) end

3 months ago | 0

| accepted

Answered

Unable to convert expression into double array.

Your problem is that you did not assign numerical values to your sym variables. Therefore, when you do double(sym_variable), mat...

Unable to convert expression into double array.

Your problem is that you did not assign numerical values to your sym variables. Therefore, when you do double(sym_variable), mat...

3 months ago | 0

Question

Archimedean solids in MATLAB

Hello all, I have been looking for a toolbox or file exchange that generates or gives back the vertices of the 14 archimedean s...

3 months ago | 1 answer | 0

Question

Print user-defined error messages as a table

Hello all, I would like to display an error message that informs the user of a function of the options that he has avaliable....

3 months ago | 1 answer | 0

Answered

Undefined function 'addElement' for input arguments of type 'cell'.

Check the value of "verso". If it is not a number, the conversion from cell to double using "double(...)" does not work. This mi...

Undefined function 'addElement' for input arguments of type 'cell'.

Check the value of "verso". If it is not a number, the conversion from cell to double using "double(...)" does not work. This mi...

3 months ago | 0

Answered

Can someone explain how this recursive function works step by step?

function outvar = recurfn(num) % Format: recurfn(number) if num < 0 outvar = 2; else outvar = 4 + r...

Can someone explain how this recursive function works step by step?

function outvar = recurfn(num) % Format: recurfn(number) if num < 0 outvar = 2; else outvar = 4 + r...

3 months ago | 0

Answered

Running MatLab in Python error

Have you tried to delete that "r" that is just before your path?

Running MatLab in Python error

Have you tried to delete that "r" that is just before your path?

3 months ago | 0

Answered

Combining string cell arrays to put in UITable

Values within a cell array must be numeric, logical, or char Well, your answer is there. In the following line, you are declari...

Combining string cell arrays to put in UITable

Values within a cell array must be numeric, logical, or char Well, your answer is there. In the following line, you are declari...

3 months ago | 1

| accepted

Question

Euler 3D rotation between two vectors

Hello everyone, I would like to obtain the Euler angles needed to rotate a vector u = (0,0,1) to a vector v, defined between an...

3 months ago | 1 answer | 0

Answered

Fourier transform image and a plot of the Fourier coefficients as a function of time.

why do I have to use abs of a3 or my fftshift(a2)? Calculating the absolute value of Fourier coefficients its an easy way to p...

Fourier transform image and a plot of the Fourier coefficients as a function of time.

why do I have to use abs of a3 or my fftshift(a2)? Calculating the absolute value of Fourier coefficients its an easy way to p...

3 months ago | 0

| accepted

Answered

i have 12 grpahs saved from a matlab script is there a way to combine them

Check this other question. I did not try those methods, but I hope they help you! https://es.mathworks.com/matlabcentral/answer...

i have 12 grpahs saved from a matlab script is there a way to combine them

Check this other question. I did not try those methods, but I hope they help you! https://es.mathworks.com/matlabcentral/answer...

3 months ago | 0

Answered

App designer Textarea issue

Did you try to use a char instead of string to show the results in textarea? app.PredikcianruTextArea.Value = char(app.strp); ...

App designer Textarea issue

Did you try to use a char instead of string to show the results in textarea? app.PredikcianruTextArea.Value = char(app.strp); ...

12 months ago | 0

| accepted

Answered

i need to know why is the scale of the x-axis on my graphs differ from one another.

it seems that you have the signal duplicated in the first graph. if you want to "adjust" the span of the xaxis, I would give a l...

i need to know why is the scale of the x-axis on my graphs differ from one another.

it seems that you have the signal duplicated in the first graph. if you want to "adjust" the span of the xaxis, I would give a l...

1 year ago | 0