Réponse apportée
Repeating values on colorbar
Using the example given by Image Analyst, I commented out the Limits lines of code, and it works as intended. Give that a try. ...

environ 5 ans il y a | 1

Réponse apportée
How to select legend in multiple subplot?
Just add the legend line in each "program". (first program) subplot(2,2,1) plot(x,S) hold on subplot(2,2,2) plot(x,E) leg...

environ 5 ans il y a | 1

Réponse apportée
Conditional Statements Between Two Arrays
a = 1:100; b = 1:2:100; c = ismember(a,b); % index of values of array a inside of array b d = a(c); % the values inside of a ...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Saving mat file with prefix over loop
Your Edited .mat file does not exist, so you must create it. Check to see if it exists, if it does, append. If it does not, crea...

environ 5 ans il y a | 0

Réponse apportée
Remove consecutive values from vector
a = [1;2;3;7;10;11;12]; x = diff(a); y = vertcat(true,x~=1); % shift index down to grab first number a(y); a = 1 7 ...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
How to plot a maximum value on an existing line graph
Please use the code formatting. A=figure x=[t]; y1=[Ethanol]; y2=[X] % Plot frst graph subplot(1,2,1); plot(x,y1); hold...

environ 5 ans il y a | 2

Réponse apportée
How can i get latex symbols in my figure title with the use of variables?
I dont have all of your variables, but I personally like sprintf. I would strcat your title using strcat to bring it all togethe...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
how can I FIND column of array part from another large array?
MATLAB has a function for this : ismember doc ismember B=[11 22 33 44 55 66 77 99 12 13 16 17]; A=[11 44 33 22 55 66 77 1...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Colour legend for scatter plot
x = [1:50]; % fake x data y = [1:50]; % fake y data z = [1:50]; % "intensity" scatter(x,y,50,z,'filled'); cb = colorbar; % c...

environ 5 ans il y a | 5

Réponse apportée
Read in Text File as string Array
fileName = '<your full file path here>' % my sample text contains ---> apple, baseball, car, donut, & elephant in single column...

environ 5 ans il y a | 5

| A accepté

Question


Using Java Robot with Multiple Monitors
Hello all, I am using Java Robot to move my mouse, but it is not working across my dual monitor setup. I am using groot to trac...

plus de 5 ans il y a | 1 réponse | 0

0

réponse

Question


Interfacing with External Windows Application Window
Hello all, I am trying to see if there is a way to grab hold of an external (not MATLAB) window, and execute keyboard command...

plus de 5 ans il y a | 1 réponse | 0

0

réponse

Réponse apportée
Find elements in a matrix
This really isnt code, or even an attempt....but A = randi([10,100],8,20); B = A(A>=30 & A <= 65); % logically index A using y...

plus de 5 ans il y a | 0

Réponse apportée
find(vector==value) not working
From the FIND documentation To find a noninteger value, use a tolerance value based on your data. Otherwise, the result is some...

plus de 5 ans il y a | 2

Réponse apportée
How to minus two arrays with condition
A = [4 8 14] B = [1 2.5 5 11 17] C = B(3:end) - A % take only the variables from 3 to end of vector A more dynamic approach, ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
how to open old MatLab files with .sfit extension?
https://www.mathworks.com/matlabcentral/answers/272067-how-to-get-my-original-x-y-data-from-saved-sfit#answer_212769 ...

plus de 5 ans il y a | 0

Réponse apportée
For loop through multiple folders
For a cleaner approach (depending on your MATLAB version)... MainDirectory = 'C:\Users\OlavK\OneDrive - NTNU\NTNU\SIMA\Conditio...

plus de 5 ans il y a | 0

Réponse apportée
For loop through multiple folders
file1={'1_101_1', '1_102_2', '2_103_1', '2_104_2', '3_105_1', '3_106_2', '4_107_1', '4_108_2', '5_109_1', '5_110_2', '5_201_1', ...

plus de 5 ans il y a | 0

Réponse apportée
Creating values to a matrix with "if" statement
filename1= 'myfile.csv' [d1,tex]= xlsread(filename1); b = d1(:,1); cntr = 1; % for values outside of range since no else stat...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Having multiple individual functions in a matlab script
See here: https://www.mathworks.com/matlabcentral/answers/325839-combining-multiple-functions-within-one-script#answer_28788...

plus de 5 ans il y a | 0

Réponse apportée
Need help using fprintf for cell array
Give this a go: shape = struct('circle', [], 'triangle', [], 'square', []); %Print names of created shapes. fields = field...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Graphing a variable function with boundaries problem
Removing the extra " ) " at the end of that line, yields plots and no errors. %Part a) R=287; % Specific gas constant in J/kg....

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Cant see the line in my plot
Don't use plot if you are trying to plot each H vs V value. Use Scatter for H=200:100:36000 Height(H) = H; Gc = 398...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
help on regexp to extract words between ""
if using R2016b or later aMajorLine = 'var _0x3f86=["\x72\x65\x64","\x67\x72\x65\x65\x6E","\x62\x6C\x75\x65"]'; extractedTex...

plus de 5 ans il y a | 0

Réponse apportée
Put label in colorbar
From doc colorbar try a = colorbar; a.Label.String = 'Power (dB)';

plus de 5 ans il y a | 5

Réponse apportée
How to code fprintf on multiple lines ?
why are you using strcat instead of sprintf Also, your data would be helpful, but try: fprintf(sprintf("Les données des ...

plus de 5 ans il y a | 0

Question


Sending PuTTY-like command through TCPIP or VISA
Hello all, I am having issues with sending commands to a piece of hardware through MATLAB. I can easily PuTTY into it, and send...

plus de 5 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
Printing Results out of a for Loop
rows_diff = abs(max(M(i,:)) - min(M(i,:))); This overwrites the value of rows_diff each time. This is ok if you just want to pr...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How can I force legend not to overlap the graph?
legend(legendNames,'Location','southeastoutside') This will shift the legend outside of the graph. you can try legend(legendNa...

plus de 5 ans il y a | 4

Question


Interface with Power Supply via VISA TCP/IP Trouble
Hello all, I am trying to connect to a power supply via ethernet, and send SCPI commands to it. I have tried both TCP/IP and ...

plus de 5 ans il y a | 1 réponse | 0

0

réponse

Charger plus