get a maximum value of a vector in matlab in matlab

To get the maximum value of a vector in Matlab, you can use the max function. Here's an example:

main.m
```
my_vector = [1, 5, 2, 7, 3];
max_value = max(my_vector);
disp(max_value);
```

In this example, `my_vector` is the input vector and `max` returns the maximum value in the vector. The result will be printed to the console as `7`.
233 chars
8 lines

related categories

gistlibby LogSnag