Run script Matlab Online
Afficher commentaires plus anciens
Hi, I have a behavioral experiment programmed as a Matlab script. I can run it on Matlab Online by logging in. Is it possible to make this public so anyone can run it via the web and Matlab Online? I just want them to be able to run the script. Or is it necessary for them to have a Matlab license of their own in order to run it?
2 commentaires
Tuan Pham
le 1 Août 2021
x=1
Rik
le 1 Août 2021
@Tuan Pham what do you mean by "x=1"? Do you have a question?
Réponse acceptée
Plus de réponses (4)
Iftikhar Satti
le 19 Avr 2021
#% The ; denotes we are going back to a new row.
A = [1, 2, 3; 4, 5, 6; 7, 8, 9; 10, 11, 12]
#% Initialize a vector
v = [1;2;3]
#% Get the dimension of the matrix A where m = rows and n = columns
[m,n] = size(A)
#% You could also store it this way
dim_A = size(A)
#% Get the dimension of the vector v
dim_v = size(v)
#% Now let's index into the 2nd row 3rd column of matrix A
A_23 = A(2,3)
1 commentaire
Walter Roberson
le 19 Avr 2021
This does not appear to be an answer to the question that was asked?
The comment style is not correct for MATLAB; MATLAB does not use # for comments.
Tashfiq Mohsin
le 26 Fév 2022
Modifié(e) : Walter Roberson
le 26 Fév 2022
%a
HF =18;
HEG=105;
C=4;
fs= 20*HEG+100;
t = 0:1/fs:1-1/fs;
signal = HF * sin(2*pi*HEG*t + pi/C);
plot(t,signal);
axis([0 0.02 20 20]);
3 commentaires
Walter Roberson
le 26 Fév 2022
If you wanted y to be permited to show negative 20 to +20 then
axis([0 0.02 -20 20]);
Tashfiq Mohsin
le 26 Fév 2022
I need to put my ID: 18-37434-1
Consider this id: AB-CDEFG-H, need to put above id no, in this. Could you sahre me the m. file.
Walter Roberson
le 26 Fév 2022
Your ID with - in it would be a character vector. Index into it to get digit characters. Arrange appropriate vectors of the characters for things like HEG, and str2double to get a number
HEG = str2double(ID([10,6,8]))
nivedha manoj
le 3 Mar 2022
0 votes
% Read an Image in MATLAB Environment
img=imread('Phone storage/Download/.jpg');
% Convert image to grayscale image
- if read image is an RGB image img=rgb2gray(img);
% Show histogram of image
- using imhist() functionimhist(img);
1 commentaire
Walter Roberson
le 3 Mar 2022
Unfortunately I seem to be missing the concept in your Answer that would assist someone in deploying MATLAB code as a web page?
Devisha Tiwari
le 11 Avr 2022
Modifié(e) : Walter Roberson
le 11 Avr 2022
x = 0 : 0.1 : 1;
y = x. ∧ 2;
avg_y = y(1 : length(x) − 1) + dif f (y)/2;
K = sum(dif f (x). ∗ avg_y)
3 commentaires
Devisha Tiwari
le 11 Avr 2022
Modifié(e) : Walter Roberson
le 11 Avr 2022
a = 0; b = 3; n = 20;
h = (b − a)/n;
x = a : h : b;
y = x · ∧2;
h ∗ trapz(y)
Walter Roberson
le 11 Avr 2022
In your line
h = (b − a)/n;
you accidentally used the Unicode U+2212 "Minus sign" instead of the dash character U+002D
Walter Roberson
le 11 Avr 2022
In your line
y = x. ∧ 2;
you have accidentally used the Unicode U+2227 "Logical And" character instead of the Unicode U+005E "Circumflex accent" character
Communautés
Plus de réponses dans Distance Learning Community
Catégories
En savoir plus sur Platform and License dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
