Réponse apportée
Having trouble converting rpm to 1/s using unitConvert from symunit
You want rps u = symunit; n = 2950 * u.rpm; w = vpa(unitConvert(n,u.rps))

plus de 2 ans il y a | 1

Réponse apportée
creating an array from a single user input
userinput = input('input nth value for fibonacci calculation:'); %define two empty matrices one for fibonacci values and one fo...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
low quality figure problem when saving as svg or pdf ( using fill function)
How is the quality different? My saved pdf looks just the same. x=rand(10,10); y=rand(10,10); z=rand(10,10); figure,axis equ...

plus de 2 ans il y a | 1

Réponse apportée
Mask with a for loop
removeData([2 3 0 0 7 8 0]) function [newVec] = removeData(vec) newVec = zeros(size(vec)); for x = 1:length(vec) %don't hav...

plus de 2 ans il y a | 0

Réponse apportée
Easiest way to check if the point is on the land or on sea?
Do you have the mapping toolbox? Use https://www.mathworks.com/matlabcentral/fileexchange/48661-landmask If so it is as simple a...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
How can I load data from Excel file to Matlab in script and use the data loaded to calculate?
MSU1=readmatrix('Relaxation data.xlsx','Range','A4:E82')%load the others following the same method

plus de 2 ans il y a | 1

Réponse apportée
t test ( not sure if my implementation is correct)
N=randi(100,5,4);%your matrix; R=randi(100,5,4);%your matrix h=1; for n=1:4 for r=1:4 H(h)=ttest(N(:,n),R(:,r));...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
How can I load data from Excel file to Matlab in script and use the data loaded to calculate?
Use readmatrix or readtable. If you attach your spreadsheet we could help more.

plus de 2 ans il y a | 1

Réponse apportée
Greek character print in the command window, but not when I publish a script.
display(char(945)); display(char(946));

plus de 2 ans il y a | 0

Réponse apportée
how to use elements from array to sort data
Keep your data stored in matrices that you can index into. numdata = xlsread("res Data.xlsx"); Q=numdata(1:5,:); F=numdata(6:...

plus de 2 ans il y a | 1

Réponse apportée
How to create a function which takes one column of data as its input and another as its output
Just use the find function. find rng(1) A=randi(100,10,2) f=A(find(A(:,2)==88),1)

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Bessel Function Calculation in Matlab
You need to increase your k as z gets larger. n=sym(1); F(1)=n; for k=1:202 F(k+1)=F(k)*k; end J=zeros(1,60); for z=1:...

plus de 2 ans il y a | 2

Réponse apportée
product between doubles 200*200
F= 1 -((1-prob1).*(1-prob2).*(1-prob3));

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
How to make a 'case' go over each element in a vector ?
tcue = TIMES+floor(NS)-0.5;

plus de 2 ans il y a | 0

Réponse apportée
Randomize vector avoiding consecutive values
leftSides = [1,3,5]; leftPos_trials = repmat(leftSides,1,14); idx=randperm(42); while any(diff(leftPos_trials(idx))==0) ...

plus de 2 ans il y a | 0

Réponse apportée
Iteration over for loop using a vector
n_trial = 12; n_probe =7; longer_array = [1:84]; for trial = 1:n_trial for probe = 1:n_probe longer_array((trial...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Professor needs specific color for bar graph, but the hex code for the color is not working.
bar(1,10,'FaceColor','#18453B')%use FaceColor

presque 3 ans il y a | 0

Réponse apportée
I am learning still and i have no idea how to write 8y''' - y' = cos(20t) + sin(2t) in matlab
Your boundary condition was not provided. [t,y] = ode45(@vdp1,[0 1],[0; 0; 0]); subplot(3,1,1); plot(t,y(:,1)); subplot(3,1,...

presque 3 ans il y a | 0

Réponse apportée
How to convert categorical data to double with unique rows
a=readtable('Book1.xlsx'); b=zeros(size(a)); b(ismember(a.Vertical_Steering,'Limbo'))=6

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Matrix manipulation / if else loops
Misunderstood you previously. m = [0 0 0; 1 0 0; 1 1 0; 1 0 0; 1 0 0; 1 1 1; 0 1 1; 0 1 1; 1 1 1; 1 1 0; 1 1 0; 1 0 0; 1 1 0; 1...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How I find four or five colunms with distict rows from a table
First convert your table into a matrix using table2array() A=randi(100,115,64); k=nchoosek(1:64,5);%all combinations of 5 colu...

presque 3 ans il y a | 0

Réponse apportée
How to find two values in a 3D table?
B=[ 16 17 17 17 19 17 23 22 22 22 24 24 31 29 28 27 29 31 38 36 ...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Correlation with two matrices
You could just manually do it yourself. A=randi(100,10);B=randi(100,10); M=mean(A);N=mean(B); r=zeros(size(A,2),size(B,2)); ...

presque 3 ans il y a | 1

Réponse apportée
How to draw tangent plot?
fplot(@tan,[0,2*pi])

presque 3 ans il y a | 0

Réponse apportée
Location of a value in a matrix
x=0:.5:20; f=find(x==9.5) x(f)

presque 3 ans il y a | 0

Réponse apportée
ELEMENTS IN ODD COLUMNS AND ROWS
M=randi(100,10) out=imp_index(M) function out = imp_index(M) out=M(1:2:end,1:2:end); out=out(:)'; end

presque 3 ans il y a | 1

Réponse apportée
Creating array based on highest values using for loop
x=zeros(1000,16); c=1; for i=Peaks x(:,c)=Reshaped_array(i:999+i,c); c=c+1; end

presque 3 ans il y a | 0

| A accepté

Réponse apportée
generating matrices from another matrix
x = [1,0,0,1,0,1]; d = diag(x); s(:,:,1)=d; for k=2:10 t=d;t(k)=1; s(:,:,k)=t'; end s

presque 3 ans il y a | 0

Réponse apportée
using a Monte Carlo simulation with 100,000 trials to find the probability of a random integer that is larger than the other random integer in [4,21]
trials= 100000; % 100,000 trials A=repmat((4:21)',1,trials); B=randi([4 21],18,trials); A_win=sum(A>B,2); A_win_or_equal...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Running Script 100 Times to get Mean
x=normrnd(0,2,100); y=mean(90*exp(0.25*x+0.0175),2); histogram(y,20)

presque 3 ans il y a | 0

Charger plus